Chosen Solution
Fixed an iPhone 7 plus for a kid the other day and it appears that it restarts every now and then I replaced the earpiece flex cable everything seemed to be working just fine it was able to make calls without the crash happening the earpiece was working and passsd all other tests. One thing tho is the power button is broken please help.
Now after a few weeks have gone by the problem was ios and it was fixed.