You are likely hitting two different issues here. First the MagSafe outlet (DC In board) plastic tends to warp so the contacts don’t make a good contact. Here’s the needed part [product|IF162-013] see if iFixit has it in stock, otherwise it will take a bit of hunting down P/N 661-4950 as it’s been quite a few years out of production. Here’s the guide [guide|3442] at least take it out to clean the plastic and contact surfaces.
The second issue is the battery it’s self! Unless you’ve been good on replacing it every four / five years the original battery is just not up to the task! And likely was what caused the MagSafe port to be damaged! You see the charger was over powering what the battery could hold as it’s not able to take the power it was delivering, so this excess power was converted to heat! Both at the battery and the connector.
If you press the battery checker button on the side if it flashes it’s telling you your battery cycle count has exceeded the 1000 cycles. Even still I would install this gem of an App! [https://www.coconut-flavour.com/coconutbattery/|CoconutBattery] sadly, the current version won’t work in your system, post a note Chris to get the older version (let him know we sent you😇) anyways here’s the needed guide [guide|3403] sorry, iFixit doesn’t offer the battery anymore.