I have a long standing issue with my 1st generation iPhone. It is unlocked (the original iPhone has never been formally supplied in my country) but I'm pretty sure that the problem is not associated with that.
What happens is that it stops charging. It will be on the charger with about half charge showing. It recognises that it is on the charger (wall charger or Mac usb via powered usb hub - makes no difference), but the charge levels drops down as the hours go past, eventually into the red, and finally it powers itself off.
It will then sometimes respond to power being connected or disconnected with the battery icon showing either the slightest sliver of red, or no red at all, and the little power bolt. Sometimes it will be completely black-screen unresponsive.
If left on the charger, it will eventually charge up again. This can happen within an hour or so, but once it took 3 days before it started charging. Sometimes the whole thing repeats immediately (within hours) after a successful re-charge. Sometimes I get several weeks of good behaviour before it misbehaves again.
I have tried putting it in recovery mode, and re-setting up from scratch.
Any other ideas?
Mac since 1984, Apple since 1978
MacBook Pro, iPhone 5, MacBook (in living room for iTunes and searching for recipes), iPad