In my view the app support killed the platform. It would have been impossible to fix. Even if Microsoft had paid for the development it would not have made sense for companies to spend time with WP versions for just a few users.
It's one thing to build an app for a platform with not very many users; it's another to build three similar apps for three similar platforms that don't have very many users. This is something Microsoft should have done better, and falls in the camp of if you're going to be a third ecosystem, you have to be consistently good.
You would have thought that Microsoft of all companies understood the value of platforms, having maintained Win32 compatibility for a decade already at that point.
Similarly Nokia bought Trolltech for their Qt UI toolkit, because it would allow software to be developed that could be compiled for both Maemo and Symbian. But before that could be put into effect, the board panicked and brought in Elop (in large part because of American pension funds, apparently).
This more than anything was perhaps what allowed Apple and Google to take over, as it signaled to companies that Microsoft was not committed to support them for the long haul.
Not long after we started to see abominations like iPhones fitted with barcode scanner cases to handle warehouse inventorying!
I don't think this is fundamental. Microsoft really dropped the ball on Windows 10 Mobile. Building a third ecosystem is very hard, and it's a long term commitment. Microsoft had made good inroads on cheap phones with reasonable performance, and they didn't follow through with that for W10M; instead they were focusing on flagship phones. Flagship phone buyers are a lot more discriminating about everything including OS polish, app marketplace, and upgrade experience (edit to add, and a browser that doesn't suck).