"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."
Yes this is the case. Every large "Sell" order results in price going down and every large "Buy" order results in price going up. Hence typically when large orders are being executed, they are first negotiated outside for a price and then sold at the exchange. I am not talking about Ownership change event. If a company wants a change in ownership, the buyer would be ready to pay a premium over the market price to get controlling stake.