I had a similar problem. When i run my system under high torque or full load it started to loose power or shutter. I stopped smelled melting plastic and smoke came from the motor cable. The serial motor connector was melted also. The bike still worked a few days till i ripped of the cable from the axle. I found out that they use a 2,5 square/mm for each phase and a 16A connector. This is very poor for a 40A System!
I searched an found a cable with 3,2 square/mm that can take up to 260° C heat. It fits through the axle easily. I replaced the connector with a 40A connector from Harting.
Result: Before the "running" the motor stayed relative cool and the cable got hot. After the changes the motor got warm and the cable stayed cool. Till now the motor doesn´t shutter anymore at high power. And before V-Max was 72 km/h now 75 km/h so more power is now reaching the motor