It’s career advice we’ve all heard: Make yourself indispensable. Many who thought they’d accomplished that goal have been burned in recent white-collar layoffs .

Jilted workers and others who’ve witnessed job cuts say there’s no such thing as an irreplaceable employee. Some contend striving to be untouchable at work can backfire or invite exploitation. You can naively do more than what’s required, thinking effort means job security, then get axed anyway.

That disillusionment is fueling debate over the wisdom of pursuing indispensability, often along generational lines. Older workers recount times when they survived rounds of job cuts by being too skillful or versatile to let go, while their younger counterparts tend to share examples of great performances that yielded no protection.

Beth McLaughlin McDonald , 52, is a recent convert to the more cynical side.

Though she’d endured three layoffs over the years, she still believed it was possible to become bulletproof when she took a recruiting job in 2022. Working remotely in Savannah, Ga., she was promoted quickly and felt she made her team at a healthcare-technology startup better by shouldering tasks that used to bog down others.

“I truly thought I was indispensable,” McLaughlin McDonald says.

She discovered she wasn’t when the company downsized last year. In less than an hour her department was slashed from 13 employees to three, she says. Each affected person was given notice in a five-minute video call. McLaughlin McDonald now thinks nobody is ever safe, so she works several part-time jobs, believing it’s wise to have multiple income streams in case one dries up.

It isn’t that the labor market is in a rout. The national unemployment rate remains at 3.9% and hiring exceeded economists’ predictions in the latest jobs report. Instead, two other factors drive workers’ pessimism: the march of artificial intelligence and the way cuts are handled .

I hear constantly from people who worry that AI-powered tools threaten positions that seemed secure a short time ago. Now that pink slips are frequently doled out virtually, in emails or on Zoom, many workers question whether they were truly valued in the first place.

Managers counter that workers’ job hopping in recent years, though slowing , means savvy leadership includes minimizing a business’s dependence on individuals.

Some bosses say they strategically prevent employees from becoming irreplaceable. It isn’t sabotage, they insist. Rather, being overly reliant on their best team members is risky.

So if you sense a higher-up is trying to limit your importance, your gut might be right.

Too indispensable for anyone’s good

The veterinary technician was good at her job. Debbie Boone fired her anyway.

Boone managed veterinary clinics in the Carolinas for two decades before becoming an independent consultant and says she sometimes dismissed talented employees who hoarded knowledge to make themselves more valuable. She recalls this particular tech went further, stashing equipment manuals and implements in a private drawer.

“It was enhancing her status, but it was diminishing us as a whole,” she says.

Employees shouldn’t try to be indispensable, in Boone’s view. Being the only person with certain skills or information might feel like insurance. But it can lead to selfishness—and a surprise ouster by a boss who prefers team players.

Avin Kline , chief executive of the cannabis marketing agency Lucyd in Florida, says he expects most of his 55 employees to spend two to five years with the company. Understanding that turnover is inevitable, and perhaps imminent, he guards against individuals becoming essential.

Each client account has a point person, but those employees are required to share notes and reports with colleagues so that someone else can step in if needed. The idea: No account manager should be so important that a client would take its business elsewhere if the primary contact left the agency.

“When we have to replace someone, I want to feel that we’re losing somebody that’s providing a lot of value,” Kline says. “But I don’t want my business or myself to freak out.”

From irreplaceable to obsolete

Shannon Howard argues indispensability remains an ideal worth pursuing. The content-marketing director at a software company made that case recently to a group of college students near her home in North Carolina, urging them to resist the “ act your wage ” sentiment that drives many young workers, and others, to withhold extra effort.

At 31, Howard says she gets it. At-will employees can go above and beyond and get canned anyway, so why bother?

Still, “I’ve seen times when being the person who does their best, with a good attitude, saves someone’s neck,” she says. “At minimum, it builds a positive reputation and can help get another job.”

Jim Moechnig , laid off by a data-storage company in November, is still waiting for 17 years of service and good karma to be reciprocated.

He devoted nearly his entire tenure to a single software line, building unsurpassed institutional knowledge. Rather than irreplaceable, he says he came to be seen as one-dimensional.

When sales of his software slowed, his role was eliminated and job prospects for his narrow specialty were limited. Moechnig, 46, is working toward additional tech certifications that he hopes will yield new opportunities remotely or locally in Minnesota.

With several months to process his job loss, he takes a coolly objective view of the situation. His team was full of smart, hardworking people, but the business needed to cut costs. Ability provided no protection.

“If they were going to cut somebody, they were going to cut somebody good,” he says.

Write to Callum Borchers at callum.borchers@wsj.com