Battery only charges when fairphone is turned off

Did you actually do the spin test as described in the batteryguide? It’s much more accurate than the naked eye.

Actually it can. Not all devices are compatible with the same chargers/cables and the FP seems a bit picky.
Also most cables were unfortunately not built to last and wear off easily.
Get a charger from the list and a high quality data cable or try charging equipment you still have laying around at home. You may need to do another battery reset with the new charger/cable so everything works fine again.