It was only when I attempted to make small talk with my visibly squirming seatmate on a Raleigh-Durham to New York flight that I realized it was me causing that look of horror on his face, rather than the slight turbulence we had been experiencing since takeoff. A friendly chat, I had thought, might help distract him from flight anxiety. But then I noticed his eyes — wide with fear — were fixed on my computer screen, which displayed an investigative report on an airplane crash I had been reading.

I slammed the laptop shut, stammered an apology and mumbled about how these detailed crash reports were, in fact, highly comforting, and it had just slipped my mind where I was, and it hadn’t been my intention to spread worry …

Well, never mind.

But it’s true. A National Transportation Safety Board investigation report reads like a how-to book for pulling off miracles and achieving seemingly incredible levels of safety. These reports renew one’s faith in what humanity can achieve if we apply our brainpower and resources to it.

But they also remind us that, much like liberty, these exceptional levels of commercial airline safety require eternal vigilance against the usual foes: greed, negligence, failure to adapt, complacency, revolving doors at regulatory agencies and so on.

Someday, I’ll have two more reports to read (one by the Japan Transport Safety Board) from two incidents in just one week — but both events are already full of lessons.

On Jan. 2, a Japanese Coast Guard plane and an arriving Japan Airlines Airbus A350 collided. The Airbus turned into a fireball as it sped down the runway before stopping about half a mile away. Remarkably, all 379 people aboard the Airbus got out safely before the entire plane was engulfed in flames and reduced to a smoldering wreck. (Five of the six people on the coast guard plane died.)

And then on Friday, a plug on one of the unused emergency exit doors on an Alaska Airlines Boeing 737 Max 9 plane blew out a few minutes after takeoff, causing the plane to undergo rapid depressurization. Passengers told news outlets that the child sitting near the hole had his shirt torn off by the force of the wind while his mother clung to him. The plane turned around and landed safely in Portland, Ore., and no serious injuries have been reported.

Both incidents could have been much worse. And that everyone on both airliners walked away is, indeed, a miracle — but not the kind most people think about. They’re miracles of regulation, training, expertise, effort, constant improvement of infrastructure, as well as professionalism and heroism of the crew.

But these brave and professional men and women were standing on the shoulders of giants: competent bureaucrats; forensic investigators dispatched to accident investigations; large binders (nowadays digital) with hundreds and hundreds of pages of meticulously collected details of every aspect of accidents and near misses; constant training and retraining not just of the pilots but the cabin, ground, traffic control and maintenance crews; and a determined ethos that if something has gone wrong, the reason will be identified and fixed.

Consider the Japan Airlines evacuation.

Commercial airliners carry a lot of combustible fuel, and quick evacuations are essential to avoid trapping everyone in a fireball if something goes wrong. Fairly little is left to chance.

Some of this is visible to us passengers, and even a little annoying. But it’s actually a federal law that all tray tables must be put up and seats made upright during takeoff and landing. While accidents are really rare, statistically, takeoffs and landings are the most dangerous stages of flight, so you don’t want anything preventing passengers from moving quickly. That’s why large items have to be put away, as well: to clear the potential evacuation path.

As images of the passengers in Japan evacuating without reaching for their luggage show, it might be good if more airlines followed Japan Airlines’ lead and used its safety videos for explaining the logic behind the rules — as its own does for why luggage must be left behind in an emergency.

Still, the evacuation took longer than the 90 seconds that Airbus had to demonstrate as possible to get certified. And on that day, the obstacles were many. Only three of the eight emergency exits were usable, and the plane was filling with smoke. The plane had tilted forward because the nose landing gear had collapsed, the steep angle hindering passengers’ progress. The intercoms were inoperable, the crew reduced to using megaphones to direct passengers. And yet the crew evacuated all the passengers.

The passengers had other allies, too: These days, planes are designed to slow fires’ spread — many such improvements, including seats that can withstand impacts and fire-retardant designs and materials, are painful lessons learned from the accidents of the 1980s and 1990s. Indeed, the plane resisted the worst effects of the flames much longer than 90 seconds, until everyone was out.

The Boeing 737 Max line holds other lessons. After two eerily similar back-to-back crashes in 2018 and 2019, killing 346 people total, the planes were grounded. At first, some rushed to blame inexperienced pilots or software gone awry. But the world soon learned that the real problem had been corporate greed that had taken too many shortcuts while the regulators hadn’t managed to resist the onslaught.

On the surface, there is little reason to assume the failure of the exit door plug on the Alaska Airlines flight is related to the previous crashes. The plane is very new, about eight weeks in service, and the incident happened at relatively low altitude, which suggests a manufacturing and assembly problem or oversight — in which case, corporate culture might come under scrutiny again. For the actual facts, though, we will await that safety board report.

But what happened after the door fell out is textbook: The pilot declared an emergency, the air traffic control quickly arranged a clear runway, the plane circled right back and landed in just about 15 minutes.

We’ve since learned all this may not have been a complete surprise. The N.T.S.B. told reporters that a pressurization warning light in this plane had come on three times before, at least once in flight, during its short time in service. The maintenance crews had checked and cleared the light, but Alaska Airlines thankfully restricted the plane to flying over land so it could return rapidly to an airport if it came on again. Whew. If the door had blown out at high altitude and over the ocean we may not have had the same happy ending.

And it wasn’t all smooth sailing back to the airport. The cockpit door flew open from the depressurization, jamming against a bathroom door, and one pilot lost her headset.

Still, you’d hardly know all that from listening to the communication between the pilots and the ground: just composed, competent professionalism on the way back to the gate.

The plane’s quick return to the airport, while much less dramatic, has similarities to the “Miracle on the Hudson” 15 years ago next Monday, when the now famed Captain Sully landed a plane on the Hudson River after losing its engines to a bird strike, saving everyone aboard. It’s what pilots train for, and it shows.

Listening to calm, collected communication between Capt. Chesley Sullenberger and the control tower during the four short minutes from the loss of all engine power to ditching in the Hudson, one might not realize the magnitude of what was about to happen: that he was about to attempt to land a cylindrical object weighing roughly 150,000 pounds in a narrow waterway next to one of the world’s largest cities.

But these kinds of emergencies are what pilots train for.

“One way of looking at this might be that, for 42 years, I’ve been making small regular deposits in this bank of experience: education and training,” he told Katie Couric shortly after the incident. “And on Jan. 15, the balance was sufficient so that I could make a very large withdrawal.”

Even if the pilot is at fault, N.T.S.B. investigations are carried out as “no blame” processes — the goal is to identify the problem in order to make errors less likely in the future. This encourages people to be frank, in stark contrast with liability-driven cultures that encourage people to hide their errors and the authorities to seek scapegoats rather than solutions.

As the facts come in, there will be more questions as to what went wrong — United Airlines and Alaska Airlines have both found loose bolts on the grounded Boeing airliners. That coast guard plane in Japan was in the wrong place. But progress comes by acknowledging these failures and working to make them even less likely in the future.

Those N.T.S.B. investigation reports that I cherish reading represent just that kind of accumulation. Year by year, investigation by investigation, incident by incident, commercial flying has become remarkably safe despite the complexity of operation with so many moving parts at a global scale: humans, software, weather and metal objects flying through the sky.

Most of the time, it works so well that we don’t notice it — which is perhaps the true miracle of infrastructure that works well: It becomes invisible. Sometimes, it’s good to make visible the invisible many who keep us safe.