Don't put too much stock in the performance or life of no-name replacement batteries. The OEM batteries are very high quality, but you pay a huge premium for that. Some of the third party batteries are fine, but there is still a higher percentage of bad ones than with OEM batteries. Some are absolute crap, using the cheapest cells to be found. So a short-lived, no-name battery is just Tuesday.
However, any symptoms you had with the original battery that you also had with a replacement points to the laptop, since the charger tested good. The fact that you replicated the problems with both Windows and Linux also points to the laptop. With a laptop, almost all of the electronics are on the mainboard, so most problems that don't involve failed component hardware get fixed by replacing that board.
Almost no repair shops are set up to do board-level diagnostics and repairs. They swap your board for another and send yours off to a refurbisher. That's where the replacement boards come from for a 5-year-old laptop. You'll get a reconditioned board with a 90 day warranty and the cost would be a nice downpayment on a new laptop.
Unless your laptop is a very expensive, hardened unit designed for industrial or military "field" use, the components are generally less durable than what goes into a desktop computer. If it's 5 years old, it's living on borrowed time; it's at an age when you can expect other components to start to go. Everything can be replaced to keep it operational for a long time, but you will pay retail prices for the individual components plus service costs. It doesn't take many repairs before you could have bought a new laptop, with new technology, new parts, and a warranty, but you still have an ancient machine waiting for the next part to fail.
If it was just the replacement battery that failed, it would make sense to buy another one. In your situation, that still might make sense. No-name replacements are cheap enough that it won't break the bank, and it could allow you to keep going for awhile, operating the same way you do now. It's a trade-off to save some money if you can use workarounds so the charging problems aren't an insurmountable pain in the butt.
It wouldn't make much economic sense, though, to put money into repairing your laptop. You might even be able to salvage some parts from it, or save it as an emergency backup. If you're going to get another battery, use it and get your money's worth out of it before you replace the laptop. But if you decide to replace the laptop, don't buy another battery. Put the savings from not repairing it or replacing the battery toward the new one.