The real division in the Golden State isn’t between Northern California and Southern California; it is between the coastal cities and the grittier inland. That’s true even at the local level. Orange County brings to mind gently swaying palm trees and placid gated communities. But 10 miles from its picturesque coastline, in the struggling city of Stanton, it’s a different story.

A small-seeming political fight in this town, covering a mere 3.2 square miles with 39,000 people, says much about California’s enduring problems. Two years ago Stanton voters approved, 55 percent to 45 percent, a new 1 percent local sales tax. Add that to state and county sales taxes, and the combined rate hits 9 percent. Local officials say the tax is needed to prevent cuts in Stanton’s policing and firefighting budgets.

Yet a measure to repeal the tax has made it to the November ballot, after opponents gathered the required 1,285 signatures from city residents. Repeal is backed by a former mayor, a Democrat, as well as the Lincoln Club of Orange County, based in nearby Newport Beach. Stanton officials are using the GOP group’s support to depict the sales-tax vote as a coup by meddling outsiders.

Stanton is a pocket of rundown apartment complexes and decrepit strip malls with a mostly Latino population. Newport Beach is home to Fashion Island, an ultra-fancy shopping mall on a bluff overlooking the Pacific Ocean. Thus, Stanton officials have portrayed the coming tax battle as an existential fight between rich out-of-towners and hardscrabble locals trying to save their city from a wave of crime and blight.

“The group that’s against us, they live down in Newport, they live in Irvine, they all live in South County. They’re all wealthy,” Stanton’s mayor pro tem said at a public event in March. “They don’t live here. They’ve just picked our city because we’re a small city and they want to control us. We’re low-hanging fruit.” A councilman added: “Just because you’re wealthy doesn’t give you the right to come and repeal our votes.”

Yet that simple description, typical of the way some local media have portrayed it, is woefully inaccurate. There is a class battle going on in Stanton, but it’s the town’s own local officials who are representing the rich and powerful. One of the main reasons the city can’t pay its bills without the sales tax is that it gives outlandish salaries and benefits to its government workers.

When the tax was being considered in 2014, Ed Ring, the executive director of the California Policy Center, offered this idea: Negotiate a 14 percent decrease in the average pay and benefits of the town’s 44 sheriff’s deputies and 21 firefighters. This, he wrote at the website Union Watch, “would eliminate their structural deficit of $1.8 million—and their firefighters would still earn average pay plus benefits, after the reduction, of $187,285 a year, and their sheriffs would still earn average pay plus benefits, after the reduction, of $160,412.”

Total compensation for the city’s 26 other workers averaged nearly $105,000 a year in 2012, according to Mr. Ring’s analysis. You can bet that the preponderance of Stanton’s workers live outside boundaries of the tiny, crime-ridden city. (They’d be quite comfortable in Newport Beach, which has a median income of around $108,000 a year.)

There are other ways Stanton could help plug its budget hole. Like many troubled California cities, Stanton became addicted to something known as “redevelopment,” a process whereby cities would acquire properties, sometimes using eminent domain, and then float debt to pay for improvements. Gov. Jerry Brown cracked down on the practice during a state budget crisis in 2011. Yet Stanton still holds dozens of properties. These are no longer on the tax rolls, and they could be sold immediately.

Although Stanton is not the only city that ran up redevelopment debt and paid its public employees unsustainable salaries and pensions, it is less able to handle the fallout. Newport Beach came under fire in 2011 for paying two of its lifeguards more than $200,000 a year. But wealthy cities can weather such foolishness. Stanton is facing insolvency.

“When Gov. Brown killed redevelopment, Stanton was suddenly a big game of financial musical chairs,” Mark Bucher, CEO of the California Policy Center, said in a recent interview. “You had city council members just slicing and dicing city services, while spending more every year on county firefighters and sheriffs—the people who get them into office and keep them there.”

Raising taxes on retailers in a tiny city is problematic over the long haul, and a bad precedent for Orange County’s other 33 cities. Yet instead of fixing its structural problems, Stanton has embraced an approach that threatens its viability. Some see serious consolidation on the horizon. “Smaller cities will go broke, or merge, in order to achieve proper economies of scale,” Fred Smoller, associate professor of political science at Chapman University in nearby Orange, told me last month. “Something has to give.”

That’s not because a nefarious group of wealthy outsiders has come in to take over. It’s because a group of wealthy insiders—public employees and especially police and firefighter unions—already control the budget. Despite the good news about California’s recovery, one need not travel far from the coast to see the story unfolding.

Featured Publications