Chosen Solution
I got my MacBook repaired with this exact same issue in February of this year, the charging port has noticeable burn marks around the 2nd and 4th pins. Now once again it is having the exact same issues, has anyone else had a similar issue to this? What did you do to fix it? I have an apple generic charger, and the board for the magsafe was already replaced once.
Your answer is “generic” charger, the quality of which is probably far from what an original charger is. Just trash it and look for an original one, even a 2nd hand would do, but do not endanger an expensive logic board for a little saving on the charger. If it’s just the charging port that’s gone bad consider yourself lucky, at times everything gets burnt along the power/charging circuit. On top of that, uncertified chargers may be dangerous for you and your households as they may start fires.
This is not really a good answer, since the same happens with expensive original chargers. Right now, it has heppened about the 6th time with the original, 140 dollars in Costa Rica one