I'd power the phone off and pick away at the debris with a small needle or a thin piece of plastic. Over time, dust seems to have been compacted at the bottom of the lightning port, preventing the charger from going deeper into it and clicking/latching on properly. You could also carefully drip some high-purity isopropanol into the port to help unstick the compressed residues.
There seems to be a good chance of it working well after that, and a charging port replacement seems to be unnecessary.