How thick the wires need to be depends on amps, voltage drop, and wire insulation rating. For the builds I’ve done that’s based off inverter rating.
I use ampacity charts like here to determine if the wire is big enough:
When selecting a cable, one must know its wire ampacity rating. This rating has been determined by the NEC (National Electrical Code)..
www.wireandcabletips.com
Then run this through a voltage calculator like here with length and gauge of wire to make sure voltage loss does nto exceed 3%:
This free voltage drop calculator estimates the voltage drop of an electrical circuit based on the wire size, distance, and anticipated load current.
www.calculator.net
========
For heat, I can’t answer that one for sure. As the ampacity chart shows some wire is rated for 60 C and other 90C. I like to think that running a thinner wire 90 C wire with a given amperage the wire could heat that hot and since its hot enough to burn you, I don’t like that, so I use ampacity off the 60 C wire. So, 8 AWG can handle 40 amps at 60 C insulation, or 55 amps at 90 C insulation. I’d use the 40 amp rating.
The actual wire or spec sheet from teh manufacturer should show the spec. There is wire rated above 90 C. My BMS notion the crate build, but the RV comes with 200 C wire.
I tried googling formulas to see how wires heated up, but I got to many “It depends” without a formula I could use. Some of the “it depends” were, is the wire in open air or a conduit? is the air circulated?