It is a damaged resistor solder joint, or broken off capacitor near the battery. Also called Finger nailing when you repeatedly discount the battery connector, or use something that may scratch a resistor off. This causes an over amp malfunction, as soon as it draws too much battery it will turn off. For a capacitor going out, it is the same as well, people with capacitors off may experience phones restarting every couple minutes because there is no energy being stored to keep the iPhone recycling its own power. I read over 50-60 posts on this subject, and the proven fix has always been the same. it is circuit board related.