PS4 Safe Mode can be useful to troubleshoot issues with your console, but you might also get stuck in a Safe Mode loop.
Clean the "on" button, check the cable connections, and check for a software update Reviewed by Michael Barton Heine Jr Clean the PS4's "on" button and check cable connections to fix random shutdowns.