You should also check out the actual company flying the plane. Often when you buy a ticket from a major corporation like "Delta" or "American" you are actually flying on a totally different company. Some of these "airlines" use dozens of smaller companies which have their branding painted on the plane, but otherwise are totally unrelated to the company you bought the ticket from. These smaller companies exist because they do things cheaper than the main carriers (Delta / American / United) do.
Frontline did a big story on one called Flying Cheap about a second rate carrier Continental used. Passengers buying a ticket from Continental generally had no idea they were actually flying "Colgan Air." The plane crashed and all 49 souls on board were killed. The plane was a fairly safe model, but it crashed due to errors made by the pilot.
(Frontline is really top notch, not sure if they have declined recently but very good investigative journalism).
You can generally look in the fine print and see "Delta Connection flight operated by Shabby Air, Inc" on your ticket. The frontline doc tells you how you can then research that fake carrier and see what their safety record is.
I used to work in this industry, and the way these small companies operate, they are designed to have problems (one of the most egregious, is that the crew does not get paid until the plane takes off, so that if there is some iffy / risky weather, and they sit at the airport for 2 hours and then go home, they get NO MONEY. Whereas if they risk it and fly anyway, to get their rightfully due paycheck, the plane may be at risk of crashing. Really scary stuff. I avoid the 737 Max and some of the no name carriers, but due to the places I'm traveling too, it's hard.
You are actually worse off than flying a supposed "third world country's" airline in a lot of these cases, as something like Avianca of Colombia flies all of Avianca's flights and will be better trained and maintained, and with better rules, than something like Colgan Air.