in austria/germany rent protection even does not allow you to evict a tenant when you are selling a house. the new landlord has to continue the rent contract, unless they want to use the house for themselves. (but then they have to prove that forcing the tenant to move does not cause them problems. no chance of that if moving would cause the tenant to lose a job or force their kids to change schools)
If you are a good renter (important part) a landlord will kick you out only if he wants to
1)Sell the house
2)Increase the amount of money and trowing you out is the only way to do so
The first problem is unsolvable but pretty rare, a good renter is a money printer and landlords like stability the same way you do.
The second could be mitigated by rent protection laws.
In the end is still a compromise, you don't have to invest massive amounts of capital but don't have complete control