Based on article from Boat US Marine Insurance

To the untrained eye, there’s not much wrong with this alternator connection. You might notice that there’s too much conductor showing between the connection lug and the insulation, but that’s about it. Looking closer, though, things start to get complicated.

Instead of using properly crimped connections between the lug and the conductor (blue arrow), whoever made up the cable used a soldered connection. It looks like the cable got hot, possibly due to a high current draw, and the solder melted, allowing the cable to slide from the terminal lug on the alternator. Look carefully, and you can see blobs of solder in the bottom of the picture when this melted (yellow arrow). American Boat & Yacht Council (ABYC) guidelines explicitly state that solder should not be the sole means of connecting cables.

But wait, there’s more! That terminal should be covered with an insulating boot to prevent potential short circuits, and it looks like that lug terminal is not marine-rated judging by the amount of visible corrosion. Last but not least, we dread to think what could have happened had the cable fallen out and made contact the grounded engine block. This would have led to a short likely resulting in a disastrous fire or even a total loss.