I doubt that even 30% of people would consider having government as a landlord good alternative. There are so many news of poor management that depending on the government to fix your plumbing in your house seems like a nightmare scenario to me.
This is actually a good role for government intervention. The exact mechanism is not important, but the concept is. Builders tend to be out of cycle with housing need due to the length time it takes to get a project to completion. After a bust, they get very skittish and underinvest for the first half of the cycle creating a shortage and boom. Government can provide a base level of housing builds to make sure the market doesn’t go too deep into shortage. And it doesn’t have to literally build them itself, just run programs that keep building housing. Ideally it even pays for itself.
It makes sense your idea on itself but in the case of Portugal would not have worked. The market bust happened around 2002 and then the government had a debt crises in 2010.
As it's common, the housing market reflects many errors and not just one.