I didn't think that it was a water problem as that's highly unlikely.
I'm still going with a bad electrical connection at the wire nuts. Be it from the wire being oxidized before the connection was made, or that the connection was just made poorly, period.
Any type of current surge that would've been big enough to do anything would've tripped the breaker (unless you've got a Zinsco electrical panel as those are notorious for not tripping the breaker even on a dead short. Cutler Hammer panels will do that as well, just not as often as a Zinsco panel will).
Were the wires just scorched & black, or were they also actually melted (as if they were arc welded)? A high current draw will melt/destroy the wires as if they'd been arc welded, and that even will trip the breaker or blow a fuse. A long period or high resistance due to oxidation and/or a poor/loose connection will melt the insulation & blacken the copper and not trip the breaker or blow the fuse.
Also you said it stopped working and you had to shut the power off at the breaker to check it out. That right there says loose connection to me. I've seen that happen in all kinds of things. Switches, outlets, recessed lights, etc. A loose wire nut leaves a connection that's not tight and provides high resistance. The connection being loose causes oxidation to build up on the wires in the connection. After a while that loose connection will get hot enough to melt the insulation and blacken the wires. After it's done that the conductivity of the electrical connection gets so bad that the device either stops working all together or is intermittant in it working or not.
If you're wanting a little more peace of mind you can use moisture resistant/underground wire nuts. They're very spendy ($2+ each

) and aren't re-useable. So if you're using them you'll have to get the wires in there right the first time as you've got no second chance.