I'm having a lot of problems with my charging. Sometimes I connect the charging cable, the "charging" light turns on, but the device doesn't charge (or charges extremely slowly, such as 1-2% overnight). Just disconnecting the cable and reconnecting fixes the issue. I think the charge socket is getting loose.
Are there apps where I can monitor the battery current? This would allow me to see when I have issues (also to do quality check on the various cables I have). Something onn F-Droid would be preferred.
Not an app, but a device that will monitor power usage, like a kill a watt, is really handy for this sort of thing. You can tell right away if it is in a low power charging mode.
As others have said, the actual problem is probably a dirty port on your phone. The cable will wear out over time as well, so trying a different one may also help.
You'd probably want something closer to a USB C power meter. A killawatt would measure the overhead from the charger brick rectifying AC to DC. If you happen to have a killawatt on hand it would work fine most likely.