President Trump may or may not freeze federal workers’ pay: Last Thursday, he sent a letter to congressional leaders saying that he would, citing “serious economic conditions,” but said later he’d think about it after criticism from some Republicans up for re-election.

Trump is right to be concerned about public-worker costs — but a pay freeze is unlikely to do much good or much harm. The far bigger problem is benefits costs, and at the state and local level, not the federal level — something the president could tackle indirectly were he to be a bit more creative.

The federal government is big and expensive: nearly 2.1 million people (excluding Post Office and uniformed military workers) do everything from patting down people at airports to feeding animals at the National Zoo.

And even with Republicans in charge of both the White House and Congress, the size of the workforce is going up by about 10,100 people this year, thanks largely to an increase in Veterans Affairs.

These workers pull in about $200 billion a year in pay (not including benefits). Trump didn’t say how much canceling a 2.1 percent annual raise would save, but it’s likely about $4 billion.

It wouldn’t be transformative.

Federal workers are unlikely to leave their jobs in droves, as they know a future president can simply end the freeze. That’s probably good, as an across-the-board freeze could have the opposite effect to what’s intended: stronger employees — people who can earn higher pay in the private sector — might leave, leaving behind people with weaker skills.

Trump says he wants to solve that problem with a merit-pay system instead. That’s fine in theory, but federal jobs are highly regimented and carefully defined to prevent any subjective considerations from coming into play.

What, then, would be transformative? Another part of the government workforce is far larger than the federal one: 19.2 million people work for state or local governments, nine times the size of the federal workforce affected by any wage freeze.

And unlike at the federal level, the growing cost of these workers really is creating “serious economic conditions.” The problem isn’t raises in line with inflation, though; it’s skyrocketing health care and pension costs.

Consider just New York City. Fifteen years ago, pension and health benefits cost Gotham taxpayers $7.4 billion. If they had merely kept up with inflation, like most raises, they would cost $10 billion today. Instead, they’ll cost $20.6 billion, having more than doubled. And though pension costs have stabilized — at least until the next financial crisis — health and other “fringe” costs are still rising, from $10.7 to $13.1 billion in the next three years. (This is after Mayor Bill de Blasio claimed to have “cut” these costs.)

New York, to be sure, has a particularly expensive workforce — but the rest of the country has the same problems. Since the 2008 crash, their struggles to pay for these benefits have cut into the money they can spend on direct public services: filling potholes or hiring police officers.

And even higher costs loom. According to Pew Charitable Trusts research out just last week, states alone owe $968 billion in future pensions, and $587 billion in future health care costs for retirees, money they haven’t set aside.

These liabilities collide with another Trump priority on the campaign trail: infrastructure. Last spring, the president proposed a $200 billion infrastructure plan, but it relied heavily on state and local governments matching any new federal funding. If they had that money, they’d already be spending it — and absent huge reform, things will only get worse.

If Trump truly wants to transform government, he can tie a revamped infrastructure plan to helping state and local governments deal with these costs.

The obvious place to start is health care, as state constitutions protect pension benefits, complicating any federal involvement there. The private sector has an interest in pooling its own ideas with states, too. Comcast, the cable provider, is experimenting with ways to cut its own employee-health tab, as are Amazon, JPMorgan and Berkshire Hathaway.

A federal infrastructure plan could reward states that propose ideas to cut health care costs, with Washington matching potential savings, and adding a bonus when those savings are realized.

Attacking public-sector health costs, too, could have an added political bonus for the president: It could divide progressives. Public-sector workers in many parts of the country get much better health benefits than average people — but why should they?

If public-sector unions move to defend the status quo rather than looking at the bigger picture, they could fall right into a political trap. Meanwhile, voters around the country would enjoy better infrastructure — which, in turn, would make them more productive, increasing tax revenue.

Nicole Gelinas is a contributing editor to the Manhattan Institute’s City Journal. ​