Couple that with making engineers liable for what they build. Just like we do with physical engineering - build something that knowingly harms people? Get sued.
Knowingly is the key word here. The physical world is much easier to know and account for in engineering. Not so much for digital which is why security is a system of defense in depth via layers and nothing ever is 100% secure.