Sony is not really the primary threat to Nintendo, it was always smartphones. Smartphones are basically what destroyed the Wii market and badly carved up the DS market, not Sony. Switch has found a good sized niche by allowing for "real" console style games on the go which differentiates it from smartphones moreso than the 3DS and it is finding its comfort zone in the industry as a result.
Where smartphones/tablets had cornered/oversaturated the market for so-called "casual games", Nintendo had to go and offer something better than just "well we have buttons on our portable, your smartphone doesn't have that". Introducing more console style premium gaming in a portable setting and the ability to also play seamlessly on the TV is the extra kick they needed to get away from the shadow of smart devices.







