I recognized that this was going to be happen last year, pulled my manager aside and explained how dire the situation and how we needed more visibility in the company. He thought I was being paranoid, but agreed with the general benefits of improving things. We've made some promising changes, but layoffs haven't happened yet so no idea if it worked.
If layoffs are happening leadership and the board are already drawing up plans for layoffs and nobody is thinking about you they're thinking of an org chart and a list of compensation to figure out what makes the most sense from a big picture perspective. They're thinking of a product road map and who is needed to make their current strategy work. Nothing you can do now will change that.
The time to convince leadership you were mission critical is well before you realize that layoffs are coming.
All that said, layoffs are more arbitrary that most would like to believe. Don't stress yourself out too much thinking about what you can do to safe your self/team. You never had much control over this situation.