I guess you'll have to define what you mean by "none of those were directly consumer companies" because I disagree, with the exception of Sun.
As in apple has a consumer brand which creates a sense of status, and then a developer ecosystem which has to develop for Apple since they have the highest paying consumers, and a they have services which create switching costs if you try leaving the ecosystem as a consumer
You just described Acorn, Atari, DEC, Nintendo, Commodore, HP, IBM, SCO, Sun and Microsoft in certain decades. A few of those aren't strictly consumer, I suppose, but my point is: all empires decline.
Yes, but what would lead to Apple's decline? Sure, you can say that everything can decline; all I am doing is articulating why they can be around for a very long time, considering the competitive dynamics surrounding the company.