If the engine on your plane suddenly explodes in midair, shooting shrapnel into the aircraft, you need the right kind of guy at the controls to bring you safely home. When that happened to Southwest Flight 1380 last month, passengers got lucky. They had the best kind of guy. He just happened to be a middle-aged woman.

Tammie Jo Shults is a 56-year-old mother of two and a retired Navy fighter pilot. Her conversation with the control tower (“We have part of the aircraft missing so we’re going to need to slow down a bit”) was notably calm. As well as being a superb pilot, Tammie Jo was said by her brother-in-law to be “a very caring, giving person who takes care of lots of people.”

That’s no surprise. Shults is a member of what has been called The Sandwich Generation, women typically in their 40s or 50s who are responsible for bringing up their own kids and for the care of their elderly parents. That’s the other stuff they need to take care of, on top of the day job.

The incredible Tammie Jo also belongs to the group that is most discriminated against when it comes to jobs. Research by the National Bureau of Economic Research found that the résumés of older women get fewer callbacks than those of older men and of younger applicants of either sex. It turns out women after menopause get hit with a double whammy: They suffer from both age and sex discrimination.

Ageism, the editor Tina Brown said recently, is “the last taboo,” and until recently women have kept a dignified, humiliated silence about it. At the Golden Globes, the sizzling cast of “Big Little Lies” was led by 50-year-old Nicole Kidman, who made a defiant speech insisting that midlife female experience would no longer be marginalized. Actresses are calling time on the ugly Hollywood habit of retiring women over the age of 37, or generously allowing them to play the crazy mother-in-law of an actor their own age.

The Oscars triumphantly proved the surging status of Midlife Woman. Eight of the 10 actress nominees were over 40, five were over 50 and four were 60-plus. This newfound power was brilliantly expressed by the character of Mildred Hayes (Frances McDormand) in “Three Billboards Outside Ebbing, Missouri.” A ball of fury seeking vengeance for the murder of her teenage daughter, Mildred will kick in the crotch anyone stupid enough to get in her way.

The truth is midlife women make the most terrific employees

A lot of middle-aged women need Mildred’s cojones. While I was researching my new novel, “How Hard Can It Be?” the follow-up to my 2002 bestseller “I Don’t Know How She Does It,” my protagonist Kate Reddy was now 49¹/₂ and urgently needing to get back into the job market to keep her family afloat.

I found out that two of my friends were lying about their age at work. Both accomplished, attractive people in their 50s, they were old enough to be the mother of most of their colleagues and were scared to admit the truth in case people thought they were “past it.” Lying about your age is pretty hard, though, when you’re menopausal and can’t remember where you put your glasses (they’re on the top of your head!).

The truth is midlife women, with all that experience under their belts, who have ridden the rapids of family life and juggled duty and caring, make the most terrific employees. As one senior woman in financial services told me: “Of course I can handle difficult clients. I’m the mother of 15-year-old twins for heaven’s sake. I can handle anything!”

So many articles about Shults seemed to be amazed she could be CWF (Cool While Female). Yet Tammie Jo has not only enjoyed a distinguished career as a pilot, she is mom to a teenage boy and a girl in her 20s. If you’ve got two children safely to adulthood, then an emergency landing that preserves the lives of 200 people is a piece of cake. Even Donald Trump, who told Howard Stern that once women reach the age of 35 “it’s checkout time,” praised Shults for “an outstanding job.”

It’s about time that ageism became a thing of the past and the Sandwich Women got the appreciation they richly deserve. A 1903 issue of Cosmopolitan magazine described a woman of 50 as “having a distinctive charm and beauty, ripe views, disciplined intellect and having cultivated manifold gifts.” Add to that an ability to make an emergency landing when your engine just blew up and still get home to put dinner on the table. Sounds like one hell of a human being to me.

“How Hard Can It Be?” (St Martin’s Press) by Allison Pearson is out now.