What if everyone decided to sell all the shares at a given moment, let's say when the stock is trading at $40? I imagine supply would outweigh demand and the stock would fall.
No, nothing at all would happen. If everyone decided to sell at $40, that would mean that nobody had decided to buy at $40 and there would be no trades at all. The number of shares that change hands at a given price is, necessarily, the lower of the number of shares people are willing to buy at that price and the number of shares people are willing to sell at that price.
If every current holder of the stock decided to sell at $40, as many shares would change hands as people who are willing to buy at $40 can take. For more sales to happen, people would have to be willing to sell at less than $40, which they may not be willing to do.