You are warned about the temperature at 85-90 degrees Fahrenheit, or around 29.4-32.2 Degrees Celsius.
The console starts shutting down when it reaches temperatures of over 95 degrees Fahrenheit, or around 35 Celsius.
This is to prevent permanent damage to the solder and wiring inside of the PS4 itself. If the thermals are bad and they need fixing, they might cause the ps4 to overheat [-@Lemon]. If your ps4 is frequently overheating, I would recommend maintenance.
My PS4 had overheating issues aswell, but I figured out that it was due to a broken power cable. Please check if that could possibly be the cause of your issues as well. If you have another cable of the same type, please try that instead.