I can't tell if this is sarcasm or not, but software should never be used to compensate for unsafe hardware. That lesson should have become standard knowledge after the Therac-25 disaster, which happened as a result of replacing a hardware interlock with a software one.
Software is used to make hardware safe all the time. Look in any factory with automation and you’ll find hundreds Programmable Logic Controllers (PLCs) running safety critical operations, and acting as interlocks.
Look inside a car, and you can find a dozen software based systems designed to make the hardware safer. E.g. Traction control, body stability systems, ABS breaking, software that decides which airbags fire in a collision, lane departure computer vision systems, air pressure alerts, engine control systems that look for unsafe operating conditions etc etc
Ultimately software can be made safe. Long and rigorous software development processes and audit process are what makes it safe.
Ultimately there’s nothing inherently safer about hardware safety systems, they’re engineered and suffer from human error.
Proper risk assessments are always required, and safety systems should be built to match the risk. There’s no one size fits all’s. In Pelotons case, they clearly failed to assess and address the risk properly.
I agree with all of your points here, but I think there is an important distinction to be made between passive and active safety features. All of the examples you give are active features, which means they require continuous error-free sensing to remain functional. Passive safety has inherent advantages.