That won't happen. Apple is still wildly successful, just not as successful as in the past. Yahoo was a dumpster fire for years, and thus people wanted the cash before Yahoo burned it.
I don't believe apple's shareholders would let them burn a singificant amount of their cash reserves for R&D over next 5 years...unless investors truley believe said R&D has solid ROI.