There are no 100% secure jobs where once you get in no one can kick you out. Well, unless you're in India and working for the Government.
Anywhere else, your security holds only to the extent of value that you can provide to the company.
As long as you're doing your job efficiently and providing value to the company, you're very less likely to get laid off. I said "very less likely" because there'll still be chances of the company shutting down, costing you the job.
The key is not to create an illusion of security of your job but to make yourself an indisposable asset to the company. That's how you can truly reduce your chances of receiving the pink slip.
So, don't think too much about the job security when joining a company. If the work excites you, go for it.
You don't wanna spend your life feeling stuck in a boring workplace just because the company is less likely to fire you.
Join a company you'd enjoy working for.