Your problem could be related to a defective charging circuit. Do you use a genuine Apple charger and Lightning cable? Low quality copies of those can pass large voltage spikes that can damage the charging circuit.
You could also have a defective replacement battery as there are many shoddy suppliers out there. iFixit sells good quality batteries. Ideally, you want to try known-good replacement parts. That is quite difficult for individual fixers though.
There could be other issues as well and I would encourage you to try to do a hard reset (Home Button & Power Button for 10 secs) or even a DFU Restore (data loss though).
If you do have a logic board problem, then I would advise you to seek a micro-soldering repair shop so that they can troubleshoot and repair.