But in pursuing the F-35 program, Mr. Trump may be facing a target that even he cannot budge.

The president-elect is just the latest in a long line of critics in both parties who have beat up on the 15-year project, only to see it survive thanks to deep political support across the country. Lockheed has spread work on the F-35 to hundreds of subcontractors in most of the 50 states, and members of Congress typically oppose any cuts that would cost jobs in their states or districts.

It is unclear what alternative the president-elect could embrace if the military turns away from the F-35 this late in the jet’s development; the government has spent about $100 billion on the project, and 204 planes have been built. The Pentagon, under Robert M. Gates, the secretary of defense from 2006 to 2011, canceled a different fighter jet, the F-22, leaving nothing but the F-35 to replace aging fighters used by the Air Force, the Navy and the Marines.

Once in office, Mr. Trump could try to shrink overall costs by trimming back plans to buy more than 2,400 planes. But doing so simply pushes up the price of each jet. And that in turn could provoke diplomatic incidents with American allies who have contracted to add F-35s to their militaries. Higher costs per plane could exceed their budgets, as well.

In the end, Mr. Trump’s public criticism of the plane may be about sending a warning message to private companies that contract with the military. While Mr. Trump said throughout the campaign that he would rebuild the nation’s military, his Twitter post on Monday signaled to contractors that they should not try to fleece the federal government.

The immediate impact of Mr. Trump’s Twitter post on Monday was financial: After it was published, shares of Lockheed Martin had fallen by 4 percent around midday, reducing the company’s market value by about $4 billion, before rebounding somewhat. Lockheed shares ended the day down about 2.5 percent, closing at $253.11 a share.