Was it really Microsoft that killed Windows phone? Or was it simply just too late. By the time it was really available I'm not sure there was actually a chance for a third platform to survive.
They were too early, and then too late. CE and Mobile just never had devices with enough processing power or good enough hardware UI to make them viable and enticing for developers.
In retrospect, after understanding more about tech history, I suspect the leadership of Steve Ballmer during the vital period in the late 2000s and Bill Gates' spending less time on Microsoft probably had something to do with this as well.
According to reported stories, Bill used to be really good at understanding how to squeeze the last drop of performance from slow hardware, a vital skill to have in the 1980s, yet subsequently became less important when desktops became fast enough. If they had Bill Gates leading the technical direction of the mobile OSes, the extra focus on speed optimization might have been what would have allowed Microsoft to do better during the smartphone wars.
Their versioning seemed like a big problem and caused a loss of faith in the platform. They had an incompatible version jump and then another odd thing going on around the next version.
They had Windows CE in the 90s, and Windows Mobile in the 2000s.
They were in a good place to be able to release a smartphone in time.