think it's because the controller is 17a and the battery is much less?
Here is my overview as I see things...
A motor is designed with a set of components to handle, at the minimum, a specific wattage. But can often be pushed to higher amounts with certain considerations taken into account.
In your case the motor was built with the goal of 360 watts to be handled on a continuous basis. That means the windings, the wiring size and insulation, connections, ECT, should be able to handle 10 amps at 36 volts. (Watts= Volts X Amps)
And your previous controller was matched with this motor to provide this amount of current, with a little overhead for possible short periods of time. Note: When looking at specs, look and understand the differences between "continuous" and "maximum", or temporary, current draws.
So, the original concern was if your battery could handle the increased current demand of your new controller, that can supply a current of 17 amps to your motor. This seems to be a moot point, as it looks like it can provide enough power to toast your phase wires.
Also, it was recommended that you keep as close to the 10-amp current draw limit as possible.
In conclusion I would say it's not so much the matching of battery to controller. But the failure of the phase
wiring, that was possibly running at twice it's designed current.
Feel fortunate that the wiring sacrificed itself and acted as a type of "fuse". Hopefully saving the motor's windings from terminal meltdown or damage.
What can you do to make sure this can't happen again? A few possibilities...
Purchase a controller that matches your original system specs.
Purchase a controller with as minimal over current specs as possible but has a display that can limit current output.
Purchase a programmable controller.
Install a fuse or circuit breaker in your battery supply wire that would trip when exceeding desired limit.
Keep your current 3 speed switch in low position.
Limit your throttle output by mechanical or electrical means to maintain a maximum current limit at WOT. This would NOT be fool proof as in an uphill scenario the controller would still want to satisfy the throttles speed position to the best of its abilities. Drawing as much current as possible...
Along the lines of "hardening" your motor for excessive power.
Increase the phase wire size.
Install a temperature sensor and display.
Add stator fluid for water cooling.
Just my thoughts, don't know how much would hold up in court.
Example. I believe that phase amperage will run up past 2 times the battery current draw. But would expect the motor design to take this into account...
As to your last post... A poor or defective connector will certainly melt and toast. But typically, right on, or close to the bad/undersized connection.