A little over 11 years ago I ran into the first big client I didn't want to take on. Of course I realized that such a decision affected all working at our company and I started thinking of ways to allow for this. At the same time I wanted to find a way to somehow prevent a bad year (by choice or circumstance) causing us to fire people. It took a lot of discussion but in the end I came up with a scheme we agreed on that should allow us to decline clients or having a bad year.
At the time our company was set up as follows: 4 partners, 2 junior partners, 4 assistants and 4 secretaries and 1 office manager. Job security for the assistants and secretaries depended heavily on the partners and junior partners so I thought it would only be fair if they paid a little to secure one bad incident wouldn't lead to unemployment for those.
So I started to take 10% out of the salaries for the partners and junior partners and set that aside. At the end of the year, providing profits were above 200k, the company would match that. Over a 10 year period that would create a fund of around 1 million to cover any set backs.
This month it is 10 years ago that we started it and only once we have taken money out of the fund which currently stands at 975k. This means that the 1st year goes back to its contributors. The remaining amount will allow us to pay salaries and housing for a year without any income whatsoever. I don't think you'll find more security anywhere else.