Some people would argue it's basically impossible for the city to kill the industry (if they are even vaguely reasonable); others argue it's already dead.
I don't know, myself.
As far as tactics that might survive Supreme Court challenge, I could see SF's affordable housing program ramping up to 100% of units. The city could then apply those tests for eligibility in the program, in addition to the income ceiling it already uses. The city is already a command economy; state allocation of apartments according to the community's values (i.e. make life hell for tech workers at all costs) is a natural next step.
Seattle, Portland, Boulder, and New York might just do the same.
I will not be surprised to see the end of freedom of movement in the United States within my lifetime. The cities that are attracting migration do not want more people. There is widespread support, both among the greedy (who don't want their views and neighorhood character ruined) and bleeding hearts (who don't want the urban poor to suffer from gentrification) that urbanization needs to be stopped.
Maybe someone with a ton of money to spare (Apple?) will start a new city. Or maybe somewhere which is not so attached to its current state (Detroit?) will let us in.