If new supply outpaces demand, wouldn't housing also in that case cease to be a good investment? (I think your first sentence has this wrong)
Yes, homeowners collude to restrict housing supply via regional politics. But the real problem is the centralization of jobs within big cities. This is bound up in the history of manufacturing in the west and the forces of globalization.
Remote work has the chance to reverse or at least slow this trend. In the short term it may lead to an explosion in real estate prices in areas within commuting distance of the big cities. In the long term I hope it leads to people spreading out a lot more and making housing affordable again.
The claim that a house doesn't produce anything seems incorrect to me.