This is almost right, but TSMC is a fab operator yet they seem to have transitioned to 5nm just fine.
However you are correct in that TSMC still owns and operates its older node fabs. Today's cutting edge fab is tomorrow's legacy fab producing no-longer cutting edge commodity parts. This is why Apple won't buy any fabs or fab operators themselves.
Still they could sell foundry services for any spare capacity, or sell them to another company when it's no longer using them for cutting edge. I'm sure there's a very good reason they're not going that route but I can't help but think the whole world would be better off if the players that can afford it would operate their own fabs.
I guess as long as Apple thinks they can remain the highest bidder at TSMC and China doesn't invade there is no reason to think their supply is threatened.
But who would the be selling that legacy fab capacity to? It would most likely be their competitors, at least in part. I just dont see Apples management being all that enthusiastic about any of that as a business. They put a huge premium in being as focused as possible.