I have contemplated this for a long time now. A big factor that many overlook when analyzing what went 'wrong' with Nintendo can definitely be held to the Japanese culture and decisions made by previous Presidents.
The 3rd President of Nintendo, Hiroshi Yamauchi, was in charge at the time of the disputes between Sony and Nintendo. He is accredited to taking Nintendo from small card-making company to the multi-billion dollar company that we see today. Without his guidance, who know's where Nintendo would be today. To return to my point of Japanese culture, typically (although constantly changing from generation to generation) the Japanese people can be classified into the same category; a low-context culture, with a very traditional, humble and proud society that strongly take prides in their work. The decision of Yamauchi to reject could be argued to save pride of the work that he built up himself since 1952. Whilst you argue that the decision ultimately hurt the company, we could not anticipate what would happen between the two companies in the two decades since the release of the PlayStation had Nintendo agreed to work with Sony. If said scenario had panned out, we don't know where licensing and copyright issues would fall between the two giant companies when it came to Nintendo's notorious ownership of the Pokemon, Super Mario, Smash Brothers, Zelda and more.
After the 3rd President resigned, he passed on the reigns to Saturo Iwata which began the time of the Nintendo DS and Wii product lines. Since then, we've seen the decline of the company as it continuously loses its gaming market shares to Microsoft and Sony everyday, unable to keep up with the console races. However, when President Iwata passed away and the new President, Tatsumi Kimishima (former President of Nintendo of America), took office, Nintendo wanted to switch directions and go where they should have been all-along.
As many have heard by now, Nintendo is working on producing their own console, the Nintendo NX, that is being designed to completely out-do the PlayStation 4 and Xbox One in as many aspects as possible. While news of the impending console is far out, its hopeful as to what Nintendo can produce, if they can tap into the customer base of Microsoft or Sony, and if the console will do wonders for the value of the company. My only regret after all is done, is that I have yet to invest in Nintendo and I'm strongly considering it in light of their new console.
RE: Nintendo literally had the opportunity to own the entire console gaming industry, but passed it up...