Iphone 5s charging problem
When troubleshooting charging issues, I would do the following (in order):

Always try another Lightning cable and charger, preferably Apple original or MFi certified units.

The [https://en.wikipedia.org/wiki/Lightning_(connector)|Lightning cable 8-pin connector] should be sitting flush with the housing and completely inserted. If it is not, there could be lint/dust/debris inside the port impeding a proper connection. You can clean it out with fine point tweezers or a dental pick. Just be careful not to damage the pins inside the Lightning Port.

Change the battery. The battery is the weakest link in the entire phone and certainly for charger related issues. It is also the easiest thing to replace. Use a battery utility, such as coconutBattery (for Mac) or 3uTools (for Windows) to test the battery prior to removal if you can get the phone to boot properly. Anything less than 70% of design capacity will require replacement.

If the battery is in good condition, you can use a [https://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Daps&amp;field-keywords=USB+Ammeter|USB Ammeter] to determine if the phone is really drawing current when it says it's charging. If it isn't drawing current, then I would change the Lightning/Charge Port.

If a new battery and charge port still don't resolve the issue, then you either have faulty replacement parts (possible) or a logic board issue.