Hi jim !
In fact, people often think that the problem comes from a dysfunctional iPhone part. Actually, the problem could absolutely be your connexion cable or AC Adapter ! Do you use an official one ? Is it old ? I know that it can seem to be nothing but even if they are more expensive, you shall prefer using official new one. Your iPhone is mabe ok !
Let us know how it goes,
Hoping to have helped you,
Vincent