In many countries the local municipality (or county, for rural areas) government has relatively significant powers: they can pass local ordinances, raise taxes, regulate certain activities, etc. Assuming one had enough money and willing buyers, would it be possible to purchase land of an entire municipality and take over the local government as the sole legal resident?

To avoid making this too broad, I'll limit the scope to the United States.