That's why we should probably require engineering certifications for working on safety-critical software. Working on such software should require demonstrating a certain level of knowledge and upholding a code of ethics.
I generally oppose certification for engineers, but solving collective action dilemmas like this and saving lives in the process is exactly where it would help.
How do you ensure someone upholds a code of ethics? Licensing is not the answer. I'm sure there are many PEs that find themselves in similar situations.
I know examples of people in licensed fields who have sworn to uphold a code of ethics, but have been caught up in very similar situations.
I can't find it now but I just saw a video recently of a rail bridge with a crumbling foundation that had just been signed off on by a PE and declared safe by the railroad.
I generally oppose certification for engineers, but solving collective action dilemmas like this and saving lives in the process is exactly where it would help.