You could also just ask directly. I think it's a totally fair question. I don't think you'd be penalized for asking about a company's layoff history. Especially if you say something like "I'm looking for my next home, somewhere I can be for the next 5 plus years".
I might not ask in the first 10 minutes of the first interview, but once you're a few rounds of interview deep, you can pretty safely ask questions like this.