Traders can certainly spread their bets across many companies representing a business sector, and routinely do so. This "a few firms might go bankrupt so this explains why entire sectors experience massive volatility that isn't justified by long-term revenue expectations" claim seems like someone trying to rationalize irrational human behavior.
Ok, but take the airline sector for example. Maybe one or more of the airlines will go bankrupt. Maybe they all somehow survive.
The price of Delta, United, American etc. gets discounted because the risk of each individual stock being bankrupted is high. But they don’t go to 0, because there’s also a chance each of the airlines might somehow survive to next year and go back to profitability.
If all the airlines go bankrupt, someone will step in and create new companies in the sector by buying up the bankrupt companies’ physical assets, but the existing shareholders will lose everything despite the sector itself being viable in the long term.
It’s much more likely that the other incumbent airline businesses just soak up that business, or the loss of competition sees price hikes across the board. Airlines are hard to spin up.
TL;DR if the sector as a whole is healthy, and you’re willing to balance an investment portfolio across the whole sector, then your exposure to future revenues should be fairly healthy even if one company goes bankrupt. But you’re absolutely right that prices don’t behave as though this is the case.