My guess is the fault lies in a socket which is either broken or strained. If it was a motherboard
component it would be unlikely to be affected by cable movement.
You feel competent to open the case.
You can gain good access to the socket.
You can see any sign of a crack and movement of part.
You can see an imperfect joint which needs resoldering. (Such sockets are usually motherboard mounted, and not visible both sides at once)
You can with a multi meter check for a break in the circuit while wiggling the cable slightly.
You may be able to repair the laptop.
It is doubtful that it can be repaired economically, but make sure the battery is charging if you leave the computer alone for a while and switched off.