Even if you changed the OS to /e/ for instance, there are still vendor parts from Fairphone included so the OS can work with the hardware. But I don’t know how this all works together when it comes to charging and how much say the OS would have in this.
I noticed no difference in charging when I switched to /e/, but I had no problem with charging, so my observation might not apply to a phone with a possible problem.
You might be interested in charging the battery outside of the phone in case charging in the phone doesn’t work for whatever reason …