Dell laptop battery not charging

I got a used Dell e6230 for now while I wait for another to arrive.
But the next day i noticed it was not charging and instead showed plugged in, not charging.
I'd like to resolve this since it's generally in a usable condition and then give it away to a student as a beginners computer.

So I tried the hard reboot and it fails to power up. It will instead try and fail over and over until I turn it off from the power switch, then leave it for about 10-20 seconds and try again. It will then power up and show that time and date is not set up plus a few others that come after a total loss of power. But it will also show that the power adapter wattage cannot be determined, battery may not charge. The diagnostics screen shows that the charger is unknown. But the charging problem persists.

I tried to boot without the battery and it tries to start up but fails immediately and goes off like it lost power.

I could not get the exact adapter that came with it. i got another one with the same wattage 90W 19.5v 4.62A but saw no change.

I haven't tried re-seating the RAM sticks yet, but I'm hoping I don't have to do that. Laptops are rather small for me to take apart.

I got a temporary solution to the problem, but I'm not sure what it means for this laptop.
I though that maybe there could be a problem with the charger or the power jack.
So I cleaned both with a tooth brush and tried pulling up the metal contacts in the jack using a needle.
I charged normally after that. But the problem came back when I unplugged the charger from the wall socket and back about and hour later.

Then I thought I'd try cleaning he hole for the signal pin. I cut a bristle from a brush and poked and wiggled it around in the hole.
The battery charged again only for the same problem to occur again later.

I now wonder if the problem is the power jack.
I saw a video on how to remove it, and you have to take apart the entire lower portion of the laptop just to get to it.

What do you think?