Unless we understand vastly different things by "job security", I have some bad news for you.
Recent years showed that even large, profitable companies with significant cash reserves -- that had a reputation of high level of job security -- are ready to do layoffs as a sacrifice to the gods of Wall Street.
_In a way_, employment is like having a single client. You have smaller variance month to month but are more prone to unexpected events in the company you work for.
You can build financial resilience by having multiple (preferably diverse) clients.
Another thing to take into account is that you are not in control of being laid off or a client not extending their contract with you. But you are in control of your own savings. And this applies in both scenarios.