It's important to note that headline-grabbing trillion dollar figure is for a timespan that reaches 40 years from now and covers at least 2500 fighters. It's also worth noting that the JSF is funded by a consortium of nations, including United States, United Kingdom, Italy, The Netherlands, Canada, Turkey, Australia, Norway and Denmark .
it's also worth noting that 35 years of the Federal Aid Highway Act that build the US interstate system costed less that half a trillion in modern terms, created jobs, industries, and changed the landscape of the country.
it's also worth noting that 10 or so years of the Apollo program costed < $150b in modern terms, and did a lot of good for science, created jobs, and industries.
A few planes don't do much good. It would be cheaper to take that money and carpetbomb your enemy. ww2 costed ~4 trillion to the US in modern terms. A trillion dollar pricetag on any plane that doesn't travel through time is pretty ridiculous.
The only engineering Lockheed is doing is financial engineering.