In Denmark this would be impossible as we have “bopælspligt”. It means if you buy a home or apartment in an area like this, you are required by law to live in it.
I mean I really do like the idea but I've heard of incredibly long waiting lists for apartments in places like Germany simply because there just isn't enough supply to meet demand.