Thanks for the additional detail. Unless you were doing something on the box at 5am that error tells me that it may have crashed during a scrub. Note if your pool is large then a scrub may take some time, possibly hours. If that is the case then it may have momentarily overheated and the motherboard shutdown. Your stress test may not have simulated a several hours full load with the case closed up.
I had a box that would overheat during a scrub in a similar manner and the log wouldn’t catch that as it is a hardware lockout, so it wouldn’t get written. I solved it with more fans.
To improve your chance of spotting things set up email alerts for cronjobs. You can set these up in the system menu under the email option and set it to email you when a job starts. It will also send you a dump on reboot of the system state.
There are some guides on the internet for piping your /var/log/messages log to a permanent file but that requires good knowledge of Unix so if you aren’t confident I wouldn’t try that.
If it isn’t temps related it may be RAM or some other aspect of the hardware causing a random reboot. The good news is freenas is portable so you can just unplug the drive with the image, drop it into new hardware and it will mostly work just fine.
To reiterate above though, backup your data as lots of reboots is not good for hard drives.