The crazy thing is that San Fran homeowners have essentially tried to increase housing supplies in the past, by creating in-law units such as the one in the story. However, it's now more lucrative to get rid of them than to keep them on and collect rent on them. It would seem to make more sense for zoning laws to require multi-family homes (or in-law units), or at least to incentivize creating more of them. If there are 10,000 illegal in-law units, and say, the next mayor decides to crack down, rental prices will go up like crazy, even in places like the Tenderloin.
Give the landlords incentives to legalize the dwellings (rebates on the work for bringing units into compliance for example). In some cases this would require lowering the legal size of a unit, which I believe they are planning to do anyway to allow developers to build sub 300 square ft units. It's not as if San Francisco is above sweet heart deals to get what it wants (see mid Market development).
Would also be good for the local economy as it would generate work for electricians, plumbers, builders, painters and decorators etc.
After a suitable period of time (say 5 years) and ton of publicity then start cracking down on the remaining non-compliant units.