This probably won't help you, but my ATV4 used to randomly shutdown all the time, this was in the first year of the ATV4 launch.
Over time, updates seem to fix the issue, but it was really annoying when it was happening often.
Telling my ATV4 experience on the MR forum, I notice that there was a huge inconsistency in user experience of the then new ATV4. So, while you are experiencing shutdowns, many people will say their ATV4 is running great.
It is probably tvOS 11, and hopefully it will be fixed for you in an update. I noticed a lot of bugs that came with tvOS 11, some where already fixed for me, and some are still around.
Mine was also doing that. Made a Genius Bar appointment where they updated the OS and (of course) the 10 minutes I was there it never restarted. But the Genius put notes in my file and said if it happens again to call Apple support about sending it in (luckily it was under warranty until Jan 2018). Got it home and within 40 minutes it restarted.
Called Apple support- they sent me a prepaid box to ship it in. They said they’d take a look and either repair or replace it. Four days later I had a replacement in hand.