When you say the battery was at 20%, based on what instrumentation, what exactly was the reading, and has the battery been consistently low when the problem has occurred?
Now, about those melted phase wires, are there ANY OTHER SERIOUS PROBLEMS, not ones that you think may or may not be important, but ANYTHING AT ALL that you have failed to mention on your bike, that is in any way unusual or different.
Yes, melted phase wires could cause both your throttle problem and your range issue.
Yes, a battery depleted dangerously low could cause a system shutdown.
Yes, 20% battery level, especially depending on instrumentation used and type and quality of battery, can be dangerously depleted. In any case is not good operational procedure for optimum battery lifetime.
The most common reason for diagnostic failures is information that the actual user FAILS TO SUPPLY.
Previous throttles apparently contained a battery level meter? This is something to avoid. Describe the current throttle in this regard.