If more high-density housing was built, then rents would fall, middle-income people could live here again, and tech workers could pocket their fat salaries as savings (or live extremely lavish lifestyles). They would still be paid a lot, because there'd always be another tech company around the corner willing to bid up wages to their current level. For the salary "bubble" to pop, a lot of these companies would have to go out of business at once. This was exactly what happened in 2001 and 2009, and it had the predicted results: unemployment spiked, wages fell, rents fell, and people moved out of the Bay Area back to wherever they came from.
I think it's a dangerous attitude to think the salaries in CA are the actual worth of a software developer's work. It's just what FAANG can afford to pay. For many companies devs at that price point are not economically sustainable.
(Also, while there's some variance for cost-of-living in FAANG salaries in different regions, it's not that much. Google developers make less in Beijing than they do in Mountain View, but their salary still looks much more like a Google salary than a Beijing salary.)