Heat is caused by resistance. The most common reason for this a high load on the shore cord combined with mild corrosion
and a poor contact of the connection. Most boats I see with this problem have AC units. The problem is the connection just gets worse and the more heat the more resistance till it melts down.
This is a picture of an inlet that was on a boat where the owner installed a AC unit but failed to upgrade the wire from the inlet to the panel. It was a #12 wire as that was all the was needed when the boat was built in the 80s with little AC load. If you look you can see the wire to the right note the insulation
burned off the black wire. This was very close to catching on fire, fortunately the cord failed before a fire could start.
I try to recommend adding an additional 30 amp service
just for AC units but am often met with the argument it does not exceed 30 AMPs. True but it gets close and you can see what the results can be when working on the edge. It does cost more but can save your boat from a fire.
At the very least keep a close eye on the condition of your shore cord both ends and fix what is wrong right away. If you keep having to replace cord ends something is wrong and you need to have it checked. You are likely using more amps than your cord can safely handle.