In 2001, seeing what was coming, I left a Linux distro startup and went back to a previous and seemingly secure IT job. I even had plans to take aircraft lessons...
Then, the owner sold the company. The buyers were actually "locusts" - people that offer to buy struggling businesses just to hollow out the assets and then hand the company back ("we saw too many problems, so we are no longer interested").
Back to a market that was fully depressed, had to take a project involving gambling machines (I think they are called "one-armed bandits" in English). It was a technically interesting project, but the people involved in this business are unbearable. After some months into it, I trembled every time the phone rang. After I finally quit, it took 6 years to fully recover from anxiety and depression.