I'm Curios, is the wire harness warm to the touch if the bike is not in use, but plugged in ? Also after the motor quits, how hot does the controller or motor feel ? The motor should feel almost hot and that's normal if you ride it hard. If it's burning hot, then you would have a problem. I'm more inclined to believe the controller is the problem. I have glitchy controller myself, but it works well enough that's simply not worth the time and effort to figure out why it's glitchy.
Also, just how much was your brakes preventing your wheel from turning ?