Might not a solution to both problems be high property taxes for unoccupied housing? If you are buying purely to park your cash, and effectively take those units off the market, some strong disincentive should exist.
In addition to wanting to keep housing affordable for workers in cities and elsewhere, cities should be scared witless by the thought of "ghost towns" and neighborhoods with 30% residency. Cities are not collections of streets and buildings, they are made up of the people that reside in them, and without people, the economy of a city will collapse.