That exactly right, noone is.
Thats why noone uses C++ or javascript in safety critical devices
Even in 'normal' industry its is a huge problem and we need safer languages, i.e. Rust (merits to be seen)
Err... C & C++ are the primary languages used in typical safety-critical systems. I've used it.
JS... of course no one uses that mainly because the abstraction level is too high, the number of layers of non-safety-critical code massively outweighs the application code.
The critical thing about safety-critical code isn't really about the code... its the whole development process. Implementation is just one small part of that process.
> Thats why noone uses C++ or javascript in safety critical devices
Ooh, no that's fairly incorrect. Javascript for sure is less common because it's the web browser language, but C and C++ are used all the time in embedded safety critical designs.