@Siwastaja: I'd still be cautious with software only protection. I have come across (extreme) situations where the microcontroller stops completely (not even a watchdog reset) or executes random code. Therefore I always have hardware cycle-by-cycle current limiting in my software based SMPS designs as a backup.
Many peripheral HW features are also in risk of stopping. Often they require clock signal, at very least, which can stop either due to a software fault (runaway program counter accesses clock tree configuration), or through oscillator failure.
Some do have asynchronous protection features, check it up. There is still the risk that software fails to initialize it properly, although it seems quite small to me.
For really critical cases, you may want to add an external, like analog, protection. For overvoltage, independent analog crowbar + properly specified fuse, for example.
Current limiting often isn't a problem; it's easily made safe with a properly sized fuse (which is inexpensive and simple). Sure enough, software fault then causes hardware damage blowing up the semiconductors and the fuse, but then again, this becomes just an availability/maintenance problem. The good thing with software is, it does not age (in this context), and variation between units is minimized. With ST, of course, they may suddenly completely change the MCU behavior without changing part number so all bets are off regarding what you receive from your distributor. A recent example being STM32H743/H750 changing the ADC sampling clock frequency by factor of two, which could have the potential to keep application running normally but affect rarely needed protection functions, so that some PCBs in the batch work and some are dangerous. The only thing we can do is hope this never happens again. Or run full test of all features on each PCB. Which is obviously what we should be doing on anything safety-critical.
Keeping the software simple (and state space small) is a good way to avoid surprises; then each feature can be thoroughly tested and verified.