These DC sockets are NOT a unit soldered onto the circuit board, but are on a flying lead and then plug into an edge connector elsewhere. So do not expect a lose jack to mean the solder connection is broken- as the whole jack case is "floating" from the factory design! ( I took my laptop apart expecting a cold solder joint and it is not connected that way)
The wire leads that are soldered onto the back
Of the jack case may be loose or broken from the jack wiggling around- or the contact pins inside the jack that detect if the peer supply is plugged in etc, may also be worn down or bent out of position. Either way, you can replace the complete assembly by unplugging the unit - no soldering is needed. (unless you see an obvious wire break from the back of the jack case assembly)
I suspect a battery that fails to charge has a bad contact inside the assembly if all wires look intact.