You can factory reset a PlayStation 4 from your console's dashboard and via safe mode on your console.
You can turn off your PS4 without a controller by using the power button on the front of the console. Here's how to do it on any PS4 model.