And we were lucky too.
In reading the biographies/autobiographies of the Mercury Astronauts, evidently it was commonly understood that we would lose one of them during the Manned Mercury missions. Yikes
Of course luck favors those who are prepared. Reading about how the Mission Controllers were trained is most interesting. They trained for everything, especially for stuff that "could never happen".
It was not until the later Apollo missions that NASA had a "perfect" mission. Every mission before had some potentially disastrous problem that the team of the astronauts and ground controllers solved/mitigated.
Space flight was (and still is) risky. We had good people building good stuff and training good people to be even better. That's why we were lucky.