And if a product fails in a significant way, you'd need to either revoke the engineer's license, or impose even more serious punishments.
Without appropriate legal structures, the best you can do is say, "No, that's a dangerous idea and I won't do it. You'd have to fire me first." Which I strongly encourage saying when appropriate. But it's not the same as a regulated industry with written best practices.
In the absence of more specific regulations, it's usually difficult to "pierce the corporate veil". The corporation itself has liability. The shareholders have limited liability. And sometimes corporate officers have personal liability for certain things.
At the same time, I don't think it makes sense to punish a junior programmer for writing buggy software. It's the corporation that should be creating processes which detect and prevent bugs.
I think rigorous building standards for certain components of software is possible, and I think we should do it, eg payments. But unlike building, I don't think all software should need to follow standards.
https://www.cnbc.com/2017/08/26/vw-engineer-sentenced-to-40-...