Of course software isn't a dogma and it's beautiful is that you can change it forever; but I believe somethings it's hard to sacrifice for the sake of ergonomics and/or safety.
...
Some years ago I met a person who was responsible for firearms design, mostly doing some due diligence for police forces about firearms ergonomics and safety.
In the words of this person, one of the biggest mistakes in the Brazilian army in terms of the bidding process; was the manufacturing/acquisition of a firearm called Imbel [1] that due to safety concerns a firing pin lock (PT-BR: percussor lock) and handle lock (PT-BR: lock of fist). With those 2 devices the chances of some accidental shoot drops dramatically; in some cases you can drop a loaded gan that it will not shoot.
However, with those extra safety mechanisms that prevented accidental firing, at least 2 severe compromises were made, one was that this firing pin lock had an entire mechanism that had another tree failure that was not calculated, and guess what started to have some issues; and, due to weight restrictions the pistol had half of the ammunition (from 15 to 7) and for operations that you had some intense cross-fire this firearm is not suitable.
[1] - https://www.cayanarmas.com.br/produto/armas-de-fogo/pistola/...