The #1 thing is to sniff out the signs of a poorly run company which, believe me, even if you couldn't care less about the machinations of business much less have never run one, you can still see the warning flags a country mile away.
When there is no clear oversight of who is keeping tabs, you're in trouble. This ill-fated company company had a staff at most 60 and yet we had a tech closet with _literally_ a laundry basket full of RAM; for WHAT? I had no idea. That was just the tip of the iceberg.
I knew it was over about 6 months later when the CEO hired a friend to run marketing and the guy ordered Aeron chairs for him and his hangers-on "team". Then we had a huge blowout shindig replete with house band, Filet Mignon and an open bar. Everyone was completely wasted and well-fed. It was glorious.
3 months later we were all laid off.