Having exactly the same problem with iMac (Retina 5K, 27-inch, 2017), 3.8 GHz Quad-Core Intel Core i5
I don't have much to add on previous replies, crash log looks the same, so I won't clutter the message with them;
the only additional thing that I noticed is that it almost always happen when I am not actively working on my Mac (my iMac never sleeps, I have lots of processes running in the background, e.g. from the shell working with remote connected servers; but it is set to lock itself and put the display to sleep. I can actively work on the device, then put the screen to sleep, and an hour after the computer is shut down -- it's not even in the login page, it basically shut down as if someone pushed the power button, and I have to turn it on with the power button, login, etc. The only evidence that this is due to a kernel panic is the aforementioned crash report that I get when I am finally logged in.
Any comments and/or advice will be highly appreciated.