Hrm, doesn't it depend on the role? If the engineer was responsible for critical systems, was there an expectation of familiarity with those kind of systems or a proven record of responsibility with them?
When we are hiring, its the right person for the right job, unfortunately with software devs: the resume doesn't matter a shite, anyone can put a shopping list of technologies on it. Sometimes years of experience don't show it either, you often get people who on the resume looks like they were working on some complex systems where in fact they might have been pigeonholed into a small task role. Even personality isnt often a good indicator beyond people skills and communication: have had people in interviews who come off as strong communicators but when put to the test are donkey's when it comes to making something.
What we do is a small project, done on the candidates own time, which tests a few common dev skills they would be using in the job. It is the number one way we judge candidates ability and I haven't seen a better way to do it yet, could something like that apply to your two candidates?
The other thing you said that sticks out in my mind is the responsibility of the role: I wouldn't ever put a graduate on a product that carries high risk unless they can show their approach with similar risky work (volunteer projects, github portfolios etc instead of employment).
What you can end up getting then though is a fear of hiring people without experience and stagnation in the industry (people only hire tried and tested people as opposed to those fresh out of college), so its really important to have multiple roles:
Roles for graduates
Roles for intermediates
Roles for very experienced seniors.
On race: I prefer to hire the best candidate for a given job (this does not always mean having experience but its definitely weighted that way, the ones with experience and ability that did not get the job have effectively talked themselves out of the job in the interview by raising red flags).
But to not address race and the difference in the role would be misleading: For us, anyone coming in from a non EU country they need to get a critical skills Visa, this creates overhead for the company up front BUT it is a pair of handcuffs: the candidate cannot work at another company without starting the visa application process again, it effectively means if you get someone good from abroad you are guaranteed to have them for the 4 years of their visa, in an industry with high turnover as such it is a benefit to the candidate. However if you were to put two candidates in front of me with similar experience and ability and one comes via critical skills visa I wouldn't use that as a deciding factor, it wouldn't be fair on either of them.
But you could argue there is a bias in there, subconsciously, because our dev team is a mix of about 50% Non EU to 50% EU. However that is pretty much in line with the proportions on applications we get.
On the ethics of the thought experiment:
For me in the example you have given, safety would trump all, so if the guy had no experience I wouldn't be hiring him for the job, just as I wouldn't if any of the the experienced guys referees came back saying he was sloppy or cut corners in working.
I have the privilege of not having much interest in race in hiring, and get the benefit of all candidates competing on skill alone. However that may not be the case in the US based on its history: I know America is a country that for a long time removed the opportunities for black people in desirable roles, so it would be ethically good to do something towards helping reduce that imbalance first, make a level playing field before asking all candidates to compete, but even that is secondary to the ethics of safety.
If you have multiple roles you can tackle both, if you cant have both (cheating the thought experiment), safety through demonstrated ability with the risky system trumps all.
If this is a real scenario and you want to hire someone to support affirmative action, create a graduate role for the graduate, or wait for enough resumes to come in with a black candidate with experience comparable so there is a good pool of candidates to compete.