The free hand of the market fixes these issues.
If there's too many then it'll be unsustainable and close, allowing small business to replace it.
If however the government gets involved (it will..) it'll subsidize Walmart to artificially prop it up in the same way it probably incentivized it to build it there in the first place...both times with the tax revenue it made from the people it ultimately screws over.