The NTSB often "full" investigations into serious incidents involving airliners, such as runway incursions or other near-misses.
In the USAF there is a legal Accident Investigation Board, and a Safety Investigation Board. The SIB is legally privileged, and testimony cannot be used in disciplinary action or legal proceedings.
For doctors, there is whats known as a Morbidity and Mortality conference [1]. This is a meeting between doctors at a hospital in which the discussions are privileged and confidential.
[0] https://en.wikipedia.org/wiki/Aviation_Safety_Reporting_Syst...
[1] https://en.wikipedia.org/wiki/Morbidity_and_mortality_confer...
Even the passengers are part of the system. Example: those cigarette ashtrays in the bathrooms? They're not left over from some mid-century period where you could smoke on planes—they're very intentional and there to prevent fires in the event someone does smoke on a plane, which, since it's a very plausible and easy to make human error, must be accounted for safely and systemically.
That way of thinking permeates air safety thinking, and it's why air travel is safe, period.
Aviation safety is all about treating errors as facts of life, and erecting as many barriers as possible between errors and a catastrophic outcome. When errors do happen, everything is designed to trap them as early as possible before they cascade into something worse.
There are compelling incentives (such as amnesty or leniency) for pilots to self-report the mistakes they make. The entire industry has robust safety reporting mechanisms, and virtually every non-trivial error is dissected in reports for later study. When there's fatalities involved, you're talking a full NTSB investigation.