For the people who run elections at thousands of local offices nationwide, 2024 was never going to be an easy year. But the recent anonymous mailing of powder-filled envelopes to election offices in five states offers new hints of how hard it could be.

The letters, sent to offices in Washington State, Oregon, Nevada, California and Georgia this month, are under investigation by the U.S. Postal Inspection Service and the F.B.I. Several of them appear to have been laced with fentanyl; at least two contained a vague message calling to “end elections now.”

The letters are a public indicator of what some election officials say is a fresh rise in threats to their safety and the functioning of the election system. And they presage the pressure-cooker environment that election officials will face next year in a contest for the White House that could chart the future course of American democracy.

“The system is going to be tested in every possible way, whether it’s voter registration, applications for ballots, poll workers, the mail, drop boxes, election results websites,” said Tammy Patrick, chief executive for programs at the National Association of Election Officials. “Every way in which our elections are administered is going to be tested somewhere, at some time, during 2024.”

Ms. Patrick and other experts said they were confident that those staffing the next election would weather those stresses, just as poll workers soldiered through a 2020 vote at the height of a global pandemic that all but rewrote the playbook for national elections.

But they did not minimize the challenges. Instead, they said, in some crucial ways — such as the escalation of violent political rhetoric, and the increasing number of seasoned election officials who are throwing in the towel — the coming election year will impose greater strains than in any of the past.

By several measures, an unprecedented number of top election officials have retired or quit since 2020, many in response to rising threats and partisan interference in their jobs.

Turnover in election jobs doubled over the past year, according to an annual survey released last week by the Elections & Voting Information Center at Reed College in Portland, Ore. Nearly one-third of election officials said that they knew someone who had left an election post, at least in part because of fears over safety.

Another recent report by Issue One, a pro-democracy advocacy group, said that 40 percent of chief election administrators in 11 Western states — in all, more than 160 officials, typically in county positions — had retired or quit since 2020.

“They feel unsafe,” said Aaron Ockerman, executive director of the Ohio Association of Elections Officials. “They have great amounts of stress. They don’t feel respected by the state or the public. So they find other employment.”

A certain number of departures is normal, and in many cases, experienced subordinates can take over the tasks.

But departures can create collateral damage: Promoting an insider to a top elections job leaves a vacancy to be filled at a time when it is increasingly difficult to recruit newcomers to a profession that is only becoming more stressful. Experts also worry that the aura of nastiness and even danger attached to election work will drive away volunteers, many of them older Americans, who are essential to elections in all states except the handful in which residents largely vote by mail.

Each election requires many hundreds of thousands of volunteers to staff polls. At a recent meeting of election administrators, roughly half were “really worried” about recruiting enough help for next year’s elections, said David J. Becker, executive director of the Center for Election Innovation and Research, a nonprofit in Washington, D.C.

Like Ms. Patrick, of the election officials association, Mr. Becker said he expected that any election-season staffing problems next year would be localized, not widespread. He noted, for example, that groups that are new to recruiting poll workers, such as sports teams, universities and private businesses, are helping to find volunteers.

One wild card is the extent to which threats to election workers and other attempts to disrupt the vote will ramp up as the presidential-year political atmosphere kicks in.

Harassment and threats against election officials were widely reported in the months after former President Donald J. Trump began to claim falsely that fraud had cost him a victory in the 2020 election. But election officials say that the threats have not stopped since then.

In June, the downtown office of Paul López, the Denver clerk and recorder, was attacked overnight with a fusillade of bullets, pockmarking the building’s facade and a ballot drop box and bursting through a window into an office cubicle. And from mid-July to mid-August, the Maricopa County elections office in Phoenix recorded 140 violent threats, including one warning that officials would be “tied and dragged by a car,” Reuters reported.

The challenges go beyond threats to demands that can make the requirements of the job feel limitless.

In the last year, for example, election offices nationwide have been bombarded with requests, usually from election skeptics and allies of Mr. Trump, for millions of pages of public records relating to voter rolls and internal election operations. Similarly, offices in some states were hit this year with challenges to the legitimacy of thousands of voter registrations.

In both cases, the ostensible purpose was to serve as a check on the integrity of the ballot. The practical effect — and sometimes the intent, experts say — has been to disrupt election preparations and, in some cases, to make it harder for some people to vote.

“It’s impacting thousands of election officers,” Ms. Patrick said. “It isn’t the case that those who are driving the narrative are numerous. But we know there are large numbers of people listening to them and reiterating what they hear.”

Some of the language is beyond the bounds of normal political discourse.

Mr. Trump, in a speech in New Hampshire this month used language more in keeping with fascism than democracy when he threatened to “root out the communists, Marxists, fascists and the radical left thugs that live like vermin within the confines of our country, that lie and steal and cheat on elections.”

Such toxic language has an effect, said Rachel Kleinfeld, an expert on political violence and the rule of law at the Carnegie Endowment for International Peace in Washington, D.C.

“There is a very clear link between the rhetoric of politicians and other leaders who both dehumanize and posit another group as a threat to incidents of political violence,” she said. “Trump himself seems to have a particular knack for this.”

“What’s distressing,” Ms. Kleinfeld added, “is not just that election officials are quite worried by these threats, but that they’re not dissipating” in what should have been a quiet period between national elections.

Ms. Patrick said she was distressed as well. “I feel like we’re in a very tenuous time, but there are bright lights to see,” she said. “In 2022, we had candidates who lost and conceded admirably and civilly. This month, we saw people continuing to serve as poll workers and people raising their hands to run for office on platforms of truth and legitimacy. As long as we have people who are willing to believe in facts, we’ll get through this.”