Thanks for coming to the Apple Support Communities for help with your iPhone 8. If I understand what's going on, your iPhone is actually unexpectedly shutting itself down, and when it comes on your Wi-Fi is off. If you try to turn Wi-Fi on, it's greyed out and you cannot. I use my iPhone for everything these days, and would definitely need to get a situation like this sorted out as quickly as possible, so I would be happy to help!
I see you've actually done a lot of great troubleshooting already. In fact, you've already done all the troubleshooting I would offer for this issue, so the next step is to get in touch with Apple Support directly. You can do that here: Contact Apple Support .
Have a lovely day!