If you are using a bullet connector as in an EC3 conne ctor, the bullet will accept a range in wire sizes typically 18-20 gauge wire for that diameter bullet. You should always solder the connector directly to the wire leads of the ESC unless you have to extend the wiring . Going from a thinner wire to a thicker wire (toward the ESC/Motor)is not a good habit to get into. If will work for low amperage loads and short lengths but you should always try and keep the wire size the same or at least go from a thicker wire to a thinner wire (toward the ESC/Motor).
As far as the battery pugging into a small size wire, That is OK.....heavier wire to lighter wire going toward the esc/motor.