That red wire goes to the B+ on the alternator. Could/Can the alternator over produce and heat the wire like that??
The alternator sends power equal to what’s being drained from the battery through that wire, then back to the battery through the positive battery cable. Lots of times, that alternator wire is pretty skimpy for the current running through it. If you’ve got high output headlights, it could absolutely do that.