There are a lot of cyclical businesses that make money every year. It requires careful management. Factories can produce less than full capacity - but you better design for that. you can make money in the worst years without laying anyone off even - but it requires careful attention to details and not over hiring in good times as if they will never end.
Last year ai folks are all over wallstreet and articles, decrying how hardware folks are a roadblock to new frontiers in AI. They just couldn't print and pack the new chips faster.
the normal way to do that is by hiring/firing to meet demand, but in the fab business, you have 10s of billions of dollars of capex with relatively little opex. if you're running at <90% capacity, you're losing money.
Factories working at (significantly) less than full capacity gets a bit harder when you've got one of the most expensive machines on earth working in them, and production lines that'll be out of date in a couple of years