Amen… never buy a house in a HOA if you plan to actually keep and payoff said house. Even if its a “good one”, they can and do change. All it takes is a vote for your $50/mo HOA to become $1000+/mo because they want to build a golf course or do custom street signs and a pool or whatever.
In theory, in the case of eminent domain you get the value of your home paid. In practice… its often not enough to actually buy a similar house.