How would you approach this situation if you were job hunting?
It is important to consider your own preferences, don't listen too much on others :) For example, some people thrive in companies that are doing extremely well, have lots of money for experimentation, there's not much financial pressure, etc. Some others (e.g. myself) like being dropped into crisis situations because they're interesting, you can learn a lot about people and every decision matters. Also, being a contrarian can help you to opportunities that you'd not get during 'peacetime'.
You can ask about job security during an interview. Many interviewers will be honest, and if they're not, you can still guess based on their reaction.
The one thing I would be concerned about is the ~2 months after layoffs are pretty rough morale wise.
- People lost their friends and are upset about it
- Systems start breaking and the knowledge of them was lost
- Team restructuring means learning how to work with new people
- Adjusting expectations for the new velocity of the remaining engineers takes time
I personally would not join a company that recently did layoffs because socially its going to be awkward for awhile.
Are they closing one of the products and those people can't be reassigned? They decided to get rid of sales team because they weren't as effective?
There is a huge bubble of layoffs nowadays BUT they all are not equivalent in nature. An example: layoffs have been a normal thing in financial companies for over few decades (performance based).
I'd also just ask them, although of course it's hard to trust any answer you get completely.
Say you're a manager who just lost 20% work force and want a hedge against the next round, what do you do? - hire someone, anyone, to throw under the bus when the time comes
My company desperately needs people but also instituted a hiring freeze. We're not canceling any existing interviews and will treat those candidates like normal. I would suspect they have a much higher chance of acceptance given that it will be the last opportunity for teams to increase headcount for a while.
This to me reads as "it's you not me" type of mentality and I personally wouldn't join such an organization.
Did any of them send you a signed offer? If yes, do you know for sure that latter one is going through a large layoff?
Spoiler: You won't reply or respond with no.
Edit: OP, thanks for the instant downvote (which I forgot to put as the third spoiler option).