If it's a hardware problem not much you can do other than changing it, one thing you can try it to boot the server in safe mode with all docker/VMs disable, let it run as a basic NAS for a few days, if it still crashes it's more likely a hardware problem, if it doesn't start turning on the other services one by one.