Dronefly, the more I think on this, the more questions I have as to when the box melted.
If I understand correct, you pulled the pin on the breakaway switch when parking your trailer. If the box melted anytime after that, you shouldn't have been able to reinsert the pin when hooking up to drive home. However, you may have shorted/burned out other brake components/wiring.
I have read warnings on these breakaway switches (and on electric brake controllers) to not ever pull the pin while hooked to your tow vehicles 12 volt system, as this 'could' create an overload backfeed.
It also makes me wonder when you hitched up to come home, if you had already plugged your trailer back in to your tow vehicle first, then plugged your pin back in to the breakaway switch.
I would think that reinserting the pin should take the trailers 12 volt off of the entire brake system........but if something had already shorted/burned out before then, it may not.
I'm just trying to figure out if you may have caused other damage, than just besides the obvious emergency breakaway switch....and am thinking out loud.
2011 Flagstaff 831 RLBSS
I used to be addicted to time travel, but that's all in the past now.