The number of people working on these is insignificantly irrelevant compared to the number of people working on the bad stuff.
It's good that the people you highlight exist because they maintain my faith in humanity, but for every engineer that worked on Webb, there are a thousand working on privacy-destroying addiction engines.
My employer can't find people to work on space-based synthetic aperture radar that will be used to monitor and potentially combat global climate change through detecting sea level rise, coastal erosion, and foliage cover (and health) because you can make more money working on an app. We can't pay more because we're funded through grants and apps are funded either through VCs or intrusive ad revenue and intrusive ads generate more revenue than university partnerships and piecemeal contracts from various international departments of the environment.
It's ridiculous because I make so much that I am the cause of gentrification, i.e. "Enough".
But it's not as much as an engineer at Facebook.
Even your comment focuses on the financial incentives....