Would this not create an atmosphere of fear and drive society towards a fixed mindset where everyone would in case of mistake try to hide their mistake?
AFAIK the biggest upgrade to global aviation safety happened when mistakes were de-penalized, and all stakeholders could honestly discuss what went wrong and how to improve things in the future.
IMO, the biggest issues is not punishment, but understanding that a mistake was made, and an honest attempt to avoid similar mistakes in the future.
If a perpetrator fails to honestly see the harm in their actions, and perpetuate the same mistake repeatedly, then yes, they should probably face secondary consequences to make it understandable to every stakeholder that such behaviour is not acceptable. The reasoning here, however, is not some sense of global justice, but to simply de-normalize the pathological behaviour (if you repeat something without consequences it becomes 'accepted way of working').