Forming a union is much more difficult than you propose.
If workers had a notion that their store was underperforming, there's no way anyone could unionize fast enough to prevent it from closing. So it's not a realistic hypothetical. In fact, the company would probably close an underperforming store sooner if there was a unionization drive and would have plenty of time to do so before certification.
Presumably closing the store in response to an attempt at unionization would be the same thing?
After unionization, what is required when closing a store is written into the negotiated contract.
The parties could put nearly anything they want into the contract. But if the company intends to close the store then they'd just not accept anything in the contract that makes it difficult to close the store, and if the workers go on strike then they were going to close to store anyway.