Self balancing skateboard

I assumed your motor driver allowed you to control the current sent to the motor.

My guess is that with the correct wiring your motor is consuming a huge amount of current at startup and the voltage of the batteries is drooping. If the voltage droops, then the controller can no longer drive the output FETs into full saturation, so they are acting as voltage-controlled resistors and dropping a lot of power and getting hot.

Here’s an experiment you can run: start the motors up with the thin jumpers that are making it work “correctly.” Once the motor is up to speed, short out those jumpers with the beefier wires. If it continues to run smoothly, you have a power supply problem. If it begins to bog down and the controller FETs get hot again, measure the voltage at the batteries. I’ll bet dollars to donuts that the voltage will be well below what you expect.