Chosen Solution

Hey looking for a bit of advice Wife’s iphone7 not switching on (photos not backed up so world is currently ending) Won’t charge (no screen activity) Replaced the lightning connector assembly Phone then comes to life (powers up and can be used) Put on charge, all’s well for about 20 mins then stops taking charge again and powers off Swapped out the battery suspecting a faulty one but still phone won’t charge or power back on Logic board appears to be ok as Initally the phone powered up and data/settings were intact

You didn’t really say if anything happened to the phone just prior to the issue, such as a drop, repair attempt or contact with water. I will say this, if it can help anyone else reading this Q&A in the future; when you have a failing phone and data is critical, you back it up the instant it powers on for the first (and perhaps, only) time. You never know if it is fully repaired or a last hoorah until it is too late. Now, for your phone, I wouldn’t be too quick to rule out a logic board issue. It is behaving pretty much on par with a failed/failing logic board. Try disconnecting everything except the battery and lightning port (disconnect the battery during these steps), then connect that to iTunes. If the phone isn’t recognized, then you most likely have a logic board issue, unless the battery or port are defective (but you’ve already replaced them).