PS4 Safe Mode can be useful to troubleshoot issues with your console, but you might also get stuck in a Safe Mode loop.
You can factory reset a PlayStation 4 from your console's dashboard and via safe mode on your console.