I don't think discretionary vs non-discretionary, or luxury vs necessity are always helpful dichotomies. Apple sells devices that help people do all sorts of things, including some that go to the heart of people's identities and livelihoods. Staying in touch with family and loved ones, doing work, finding employment and places to live, and so on. Some of these might be discretionary in a strict sense, but they are also very important to people, even when budgets are tight.
Of course, there are cheaper versions of most of these things, whether buying non-Apple stuff or, as you say, simply holding on to products longer. I'm sure some of that will take place.
But I also there is a strong and durable underlying demand for the kinds of products and services that Apple is good at supplying.
There is a sense of inevitability to this that doesn't seem right to me. The world is full of expensive brands that have survived and sometimes thrived through numerous recessions. Apple has survived quite a few itself (though only barely, in some cases).
Indeed, it's worth noting that Apple's massive growth over the last 15 years has come in an era in which real-terms wages in many of its key markets have been stagnant. In the UK where I live, for instance, wages have basically been static since 2008, and have declined significantly across many professions. Still, technology matters to people.
I'm not saying Apple is invulnerable - there are many risks and liabilities out there. But I don't think a 'death spiral' or even a decline is inevitable.