If SF needs housing then they can just build into oakland and use BART to get into SF. Oakland is a very underdeveloped piece of real estate.
Call it NIMBY call it whatever you want but there is _no_ incentive for long term SF residents (10+ years) especially home owners to support more housing, especially for tech transplants.
I understand that the problem feels intractable, but it's because we treat the people make it so like something that simply is. It is not a thing that simply is, it is a moral choice made my hundreds of thousands of people over and over again and it is their failure.