The company then goes bankrupt and continues as if nothing happened, but the shareholders are wiped out and the debtors own the company. Happens in airlines all the time.
So "essentials" companies that have a low debt load may be interesting, especially if boring.
Berkshire Hathaway may do decently well.
I worked in computer hardware for oil & gas, there was a turndown around 2014-2015 that slowed the demand for a lot of our products. Not quite enough for layoffs or anything, but that industry can slow down quite a bit depending on market cycles.
Healthcare is also a tricky one, I'm in that now. You'd think it's safe because "everybody needs healthcare", but hospital capital equipment sales slowed a good deal due to lots of elective procedures being cancelled for months on end during different periods of the pandemic. New product launches delayed, incessant supply chain headaches on everything electronics (and other stuff too), it's a rough time for low/mixed volume manufacturers like you see in most healthcare.
For a while now I've had a vague suspicion that if we poured as much analysis into (broad strokes) smart grid stuff as we do advertising/the stock market, issues like renewables' intermittence would start looking like less of a big deal. (Although I'm aware there are already lots of smart people working on keeping the grid reliable!)