I agree with the others (though less so with homerbw)—a loose or poor connection somewhere associated with that contact.
Ohm's law is applicable here: the voltage drop across a resistance (i.e. that of the poor connection) is proportional to the current being drawn. The power being dissipated by this voltage drop is the product of the current and the voltage. If you have, say, a 0.1? resistance in the contact or the connection to it and are consuming 20A of current, the voltage drop is 2V (hardly noticeable in the RV) and the power being dissipated is 40W, which is turning into heat. 40W is a fair bit of heat to get rid of for a bit of metal totally encased in plastic; since it can't radiate all that much to the outside, it gets hotter and things start to melt and burn.
I doubt the transfer switch is involved because it's most likely a bit further away from the power inlet and heat generated there would have to be conducted through the wire between it and the power inlet to heat up the power inlet—and I would expect the wire itself would get mighty hot conducting this heat, have its insulation burn, etc. before the socket would suffer this much damage. (I have not conducted a scientific experiment in the matter, however, nor do I intend to do so.)