That rest-stop burger may have been flipped by a pimply teen, but it was conceived, tested and perfected by a classically trained chef.

Fast-food chains from Arby’s to Wendy’s are hiring top-tier cooks to run their corporate kitchens.

“You’d never assume that people like me are at the helm of Popeyes,” Amy Alarcon, an alum of a prestigious culinary school and high-end Atlanta kitchens, tells The Post. But there’s a reason big companies tap serious gourmets for the job: It takes a pro to devise crowd-pleasers that can be easily — and inexpensively — mass produced. “We marry the art and the science,” Alarcon says.

Here, toques of the fast-food world share their culinary secrets.

Best of cluck

After graduating from the Culinary Arts School in Atlanta, Alarcon was toiling in a swanky hotel restaurant kitchen when she was recruited by a corporate brand. “I had just done 16 days in a row of 12-plus hours,” says Alarcon. Burned out, she wanted a better work-life balance, so she accepted the job — to her then-boss’s horror. “He said, ‘Everything I taught you, and you go do fast food,’ ” says Alarcon, who has now been with Popeyes for a decade.

The mother of two whips up recipes for the chicken chain’s domestic and international locations, including its beloved Chicken Waffle Tenders. “I’m notorious for busting down meeting doors and saying, ‘I know you’re busy but shut up and eat this,’ ” says Alarcon. For inspiration, her team travels to foodie cities, including New Orleans, Seattle and Charleston, S.C. Recently, she ate her way through Brooklyn: “We loved Ugly Baby, Prime Meats and Wilma Jean.”

It’s ‘wichcraft

Arby’s, avant-garde? Believe it, says the chain’s executive chef, Neville Craw. “Molecular gastronomy has existed in our industry” — and in his kitchen — “for years,” the Atlanta resident tells The Post.

Take the chain’s Miami Cuban sandwich, a limited-time offering this past spring. Craw prepared the pork sous vide — a technique where food is sealed in a plastic bag and slowly cooked in a temperature-controlled bath. “It’s more accurate than cooking in the oven,” says Craw, who earned his chef whites at the California Culinary Academy in San Francisco before sharpening his knives at fancy restaurants there and in Boston.

To get ideas, Craw takes regular eat-a-thon research trips to New York delis, San Francisco sandwich spots and charcuterie shops. “I have a high metabolism, and we do a lot of tasting, not eating,” says the chef, who’s worked at Arby’s for 14 years. “Still, when you hit that 18th restaurant of the day, it becomes a challenge.”

Dairy king

“I love ice cream. I eat it every day, to be honest,” Dave Fenner tells The Post. He’d better: As Carvel’s head of research and development, Fenner’s spent the past six years mixing up new ice cream flavors, including Lemon Cookie, Cold Brew and Nutella.

Previously, Fenner...

Read more from our friends at MarketWatch