Sounds like it's overheating, causing it to reboot.
I'd check out some monitoring software like MBM5 to check the temp of your CPU. How are those fans configured? The ideal is to have one push and one pull air, creating airflow across the CPU whenever the PC is on.
No guarantee its an overheating issue, though. It could be bad RAM or a flaky area on the HDD causing corrupt data or overload of the PSU.
Sounds like you've investigated one or more of these possibilities to some degree.
I think your next step would be powering the M2 inside to see if you have the same issues.