Aftermarket chargers are mostly awful, they make sparks, may break easily and all the rest, but they charge batteries nevertheless. It seems you have a fried charging circuit here, battery shows good health condition and machine runs..that leaves no room to speculation, it's not a charger or battery issue. If you think about a replacement you may as well take in consideration the white A1342 macbook, it's pretty cheap but it's a state of the art C2D, nice performance and may run high sierra flawlessly. Probably one of the best price/quality ratios for a Mac right now.