That is actually how trademark already works, if you have enough money. E.g. well funded brands like Coke, Google, Facebook, can easily use trademark to retroactively remove rights to a name from anyone who wasn't actively using it for some non-squatting purpose - within certain trademark and legal scopes.
Doesn't matter if someone simply owned property with that name prior to the trademark. The test is more complex than that.