I had a similar problem with an old laptop with a power port that simply had worn out. After months of taping the adapter plug into a "just so" position to keep constant power flowing, it finally quit.
What I chose to do was open up the laptop myself and try to fix the problem myself.
WARNING: OPEN UP YOUR LAPTOP AT YOUR OWN RISK! CHANCES ARE THAT YOU'LL BREAK SOMETHING.
What I found on mine was a separate, removable board for the power input. Because it was relatively easy (I still cracked parts of the case in getting to it) to remove, I might have tried to track down a spare part, or solder in a new power socket. The problem is that brick and mortar electronics supply stores are a thing of the past, and getting a part that was an exact fit was more work than I was willing to do.
One thing that I could have done was to solder in some wires in place of the bad connector, to bring the connector outside of the computer, or cut off the power supply plug and solder the power supply cable permanently to the laptop. This is best if you're no longer using the laptop as a portable. Many old laptops have dead battery packs, and the expense of buying replacements might not be worth it.
If you're good with a soldering iron, you probably have similar ideas already. If you're not skilled at repairing small electronics your choice is to either pony up the money for the repair, or use that money towards a new (or working used) laptop. I've thrown out dozens of laptops that could have been very useful "if only" some costly repair wasn't necessary.