You might want to check if you aren't accidentally power off/rebooting your phone.
Guess what - the key sequence for this on an iPhone 7 is no longer Power/Wait+Action button, as it has been for all prior generations.
For iPhone 7, it is now Power/Wait + Volume Down!!!
Since these are on opposite sides of the phone, it is relatively easy for them both to be pressed simultaneously, by hand, by your belt case, and yes, possibly even in that neat spot for storing your phone in your car as shown in the photo above...
Happens to me routinely - need to find a new belt case that doesn't squeeze so tight, I guess....