@hankg @fne8w2ah It appears to be due to a combination of spark erosion of the centre pin, as lightning is prone to, ironically, arcing on connection and disconnection, as well as electrolysis over time, with the pin eroding and electroplating the connector inside the phone.
The first problem can be rectified by never hot plugging, but if you live in a humid climate, there’s nothing you can do about the second.
Indeed, while the ports last longer than the cables, they eventually fail from being coated with all that crap. Before I switched almost entirely to inductive charging and wireless CarPlay, an iPhone’s lightning port for me rarely made it to two years before dying.