F-35 costs have been declining. That’s about to change.

FORT WORTH, Texas — On a mile-long production line in Fort Worth, Texas, the next wave of the U.S. and allied militaries’ F-35 Joint Strike Fighter fleets takes shape. Dozens of nascent fighters, coated almost entirely in sea-green primer, work their way north through...