Chosen Solution
I have had this iPhone 5 since 2012. Dropped it a few times, but nothing major happened except for the lock button busted. Recently, my iPhone just keeps on shutting off and turning on all by itself. Or sometimes lines will appear slowly and then it’ll shut down. But I’ve noticed that if I’m charging the phone, it doesn’t really crash as much. Still does though. I got a new phone, and it still turned on by itself randomly. And if it’s not charging, it tends to die even more easily than when I’m not using it. It almost certainly will die every single time when I lock the phone. What’s the matter? ): Help!
I would try opening up the phone and look for any corrosion. If there is corrosion that is most likely the problem. If their is no corrosion then I would do a full reset and see if it’s a software issue. Best of luck