Chosen Solution

So I received an iPhone 7 from a friend that I was thinking of trying to fix. He said that the problem was that it’s not turning on at all, which is totally true. Now additionally as mentioned in the topic it’s trying to boot itself when put in a charger, but seems to be failing after like a second or so, after which it just tries again until unplugged. Any pointers on where to start looking on what’s the issue?

You need to rule out parts. The first thing to do is replace the battery.