If the ESC got hot enough to melt the solder on the capacitors, then something was already wrong. By default the ESC has ESC thermal protection turned on, which should have shut it down if it was simply overheating. But it sounds like it developed an internal short that caused it to get that hot.