Suffered with this issue as the iPhone 5 power went down unexpectedly (and with a new battery not a week old no less.)
Nothing down shifting around chargers did much but recover the flashing red light three times and the battery.
It was clearly not charging beyond that point after 45 minutes.
Using a vacuum with a heavy suction for debris did not change any result. The new charger cable overnight did nothing except now show a black dead screen.
Later that day sprayed a bit of dexoyit on a picture hanger frame stud small enough to scrap around inside. Out comes a chunk of damp lint balled up? How is that possible?
Pull that out and put it down for viewing and go back in again. Now less but another smaller damp piece. Two more times scooping around and still smaller pieces damp from the deoxyit collect and come to the surface. Joins their brothers on the hall of lint shame.
Go back and plug it in and get the red solid light with battery. Few minutes later the Apple logo comes on and it loads up showing 4%.
Battery continues charging up.
Thanks to you Lint man whoever you are. That's some unreal lesson to learn saving time, heartache and money. Salud!