Nearly 1,400 workers at a truck factory near Dayton, Ohio, were laid off in the days before President Trump was set to hold a campaign rally in the area on Saturday, part of what he says will be a 32-day stretch of rallies.

The former Navistar plant’s owner, International Motors, chose to unload the facility after Mr. Trump’s broad tariffs failed to lift demand. A Canadian manufacturer of armored vehicles, Roshel, is buying it, and laid-off workers say they expect to be rehired in six to 12 months. Roshel said in a statement it is “working with everyone involved not only to protect the current workforce, but to more than double it over the coming years through a phased process.”

The plant closed its doors in a region that has shed about half of its 90,000 factory jobs since 1990, after the North American Free Trade Agreement and trade with China made auto parts cheaper to buy abroad. This year’s election is a test of the working-class coalition that carried Mr. Trump to the White House, and voters in and around Dayton are disgruntled about inflation and the war in Iran. One Ohio race could settle control of the Senate: Republican Sen. Jon Husted faces former Democratic Sen. Sherrod Brown, who is working to ride that discontent back to office two years after losing his seat.

For some here, the break with the president is already done. Asked how many times he voted for Mr. Trump, Bos, a member of the United Auto Workers who identifies as a centrist, held up three tattooed fingers. “Something has to change politically in this country,” he said.

Mr. Trump has anchored his case on the economy. “All over the country, they’re building factories, plants, manufacturing’s coming back,” he said on Thursday. “The only thing we’re doing badly at is public relations.” He has also promised $5,000 checks if Republicans hold the House and Senate next month, an idea Bos said offended him. “It feels like a bribe, a slap in the face, and, like, that we’re all ignorant,” he said.

The White House points to an $850 million investment by the aircraft maker Electra, along with Ohio announcements from Honda, Stellantis and others, as proof the president’s policies are creating jobs. Phil Plummer, the Montgomery County Republican chairman and a state representative since 2019, credits Mr. Trump with holding the party’s coalition of businesses and working-class families together. The local economy has picked up in recent years, too, as Wright-Patterson Air Force Base added government workers and drew aerospace companies like Joby Aviation, Electra and the Sierra Nevada Corporation. “In economic development, it takes time,” said Jeff Hoagland, the chief executive of the Dayton Development Coalition.

The president’s signature legislation, the One Big, Beautiful Bill, stripped taxes from tips and overtime but added little to pay stubs here, because there was little overtime to work. “We weren’t getting a lot of overtime because of the economy,” said Marianne Donnelly, who drove a forklift at the factory. “There just wasn’t any to be had, very little to be had.”

On the Monday before the layoffs, Morgan Hughes and JoJo Burkhard were knocking on doors in Kettering, a Dayton suburb, urging union members and retirees to vote Democratic. The plant job had helped Ms. Hughes, 35, buy a house at 21 and work beside her father. Ms. Burkhard said inflation had made the pitch easier. “It isn’t a hard pitch at all,” she said. “And even if they don’t want to stay Democratic long term, they’ll at least give the candidates a chance this election, which could be a turning point for us.”

After that morning of canvassing, over potstickers at a Chinese restaurant, the weight of the week caught up with Ms. Burkhard. The layoffs meant no work for her, her boyfriend or her mother. She cracked open a fortune cookie, and the words inside read, “You’ll find your inner strength to overcome challenges.”