I don't know why you are
vilifying government housing, it is very obviously the solution. Housing initiatives have always been a target for budgetary looting by politicians looking to solidify their legacy with more glamorous and superficial endeavors, but properly managed they are the only way for affordable housing to happen in cities that are already grossly affordable even for full time workers.
The market will never fix this, either. Why should a developer spend money to build something and wait far longer (if ever) to recoup their initial investment from affordable rental rates, when they can just price right along with the market and be out of the red sooner? Real estate booms and crashes, no one wants to wait for their goose to lay its first egg a decade after the local real estate market cools off. The market always favors the most rapid turn around on investment, and in cities like SF where tech companies gladly hand 22 year olds more money than they've ever seen, the quickest and safest buck for a developer are these cheap, fast, luxury builds that can command rents at the top of the market because the units smell like new paint.
The current favorite strategy among local governments is to offer developers large tax incentives to tack on a small percentage of low income units along with the luxury build. It is hardly even a half measure, as the rest of the luxury build will surge the rest of the local real estate market. Instead of offering tax incentives to attract luxury developers, local governments should instead let the market dictate what level of luxury building will be profitable, and focus on building low income municipal housing that is properly managed, and it's budget protected from raiding. Maybe something modern, and modular such that a family unit can be cheaply reconfigured into studios as demand dictates. In my city, the downtown YMCA has low income apartments in the dozen or so floors above the recreation facilities, and it works to keep these residents off the streets and employed.