> it would however hurt the middle class since
If the middle class are the ones buying the properties, then they're the ones selling them. Therefore it actually injects money into the middle class, foreign capital that never existed in that country.
>he most touristic areas are profiting a lot from all that foreign tourist money, but a lot of the locals can't afford to live there anymore as all that tourist money
Those who move to a country to work and live there on anything but a very short term basis on not generally considered tourists. Most of the money flowing into the rich is a function of capitalism, not just tourism. You can examine virtually any industry and make the same statement. Yet, some fraction of money is usually better than nothing for the middle class people benefitting.
The US has your Austrian analogue, it is called Hawaii. In Hawaii most money is made from tourism. The common person there is mostly employed in tourism. Housing prices are high, because lots of people want to live there. The result when it was mostly closed off for coronavirus was that although demand for housing decreased, unemployment skyrocketed without tourism, making the middle class worse off.