Excessive heat is normally caused by resistance somewhere in the system. It could be a bad cable, battery post, connection, or corrosion somewhere. Often a cable is corroded. It even can happen internal to the cable.
When you press the pedal to full throttle, you use all of the voltage available. You're requesting the system to provide the max voltage, and it's having a hard time supplying it because of a bottleneck somewhere.
BTW, I once blew a battery post out because of a corroded internal cable connection.