Isnt this exactly what Ada language was created for? Hence, the use by the military for avionics and critical systems.
"It also includes facilities to help program verification. For these reasons, Ada is sometimes used in critical systems, where any anomaly might lead to very serious consequences, e.g., accidental death, injury or severe financial loss. Examples of systems where Ada is used include avionics, air traffic control, railways, banking, military and space technology."
All that was once old, is new again.
Ada's decline was not due to Ada's design, which IMO is one of the best Language designs out there. However in my opinion the decline of ada is due to its closed source compilers that are mainly used. Additionaly also just a lot of security critical code thats not open source.