Switch's third party support will, at best, be decent. In 2-3 years, PS5 will be launched. A while prior to that, Sony will be distributing PS5 dev kits. Do I really have to explain what that means to the Switch? A system that cant even run fairly demanding PS4/X1 games?
Nintendo handhelds always have excellent third party support. Since the Switch is a big leap in power compared to the 3DS, the third party games this time around are going to be extremely impressive on the Switch.
As for PS5, I am glad you mentioned that, because Sony is basically handing the whole market to the Switch with how they are handling the PS5. If they release in 2020, then Switch has had a full three years head start on the PS5. On top of that Sony consoles never have any good games for the first couple of years, which means Switch will not have any real serious competition until 2022. Sony is basically handing all of gen 9 to Nintendo.
While I do think Nintendo Switch's third party library will be great in the end, I think it is strange how slow publishers have been to react to the system's success. There should be more gen 7 ports by now at the very least. Also, even if they don't have any games ready to show, there should have been more announcements of support for the platform (especially with how many publishers announced projects and support for PS4/Xbone when the games were nowhere near ready).
I suppose smaller developers have really been benefiting from this developer lag, so I see it as beneficial in some ways in the end.
As for PS5, I am not sure what Sony can do to differentiate the PS5 from the PS4 enough to make it as successful as the PS4. This is the same issue Nintendo had with the DS to 3DS transition, while the predecessor broke records left and right, the successor just did more of the same slightly better and less people bought-in as these things were no longer fresh.
And the PS5 has issues of diminishing returns, not just to the layperson who struggles to see the difference between 720p and 1080p, but budgetary differences, how many developers are going to make games that they can't easily port to all the current systems?
Such games would have to be massive in budget to be of such fidelity that porting would be prohibitive, which each year fewer and fewer publishers can even afford to make such $200m+ budget games, so it really becomes less relevant since it will be such a small amount of games that won't be cross-gen.
Which is really why the Nintendo Switch will continue to get steady support after PS5 and Xbox4 launch (affirming your notion).
Also, it will have a large active install base that will probably still be growing, while PS5 and Xbox4 will be starting from scratch. And, Nintendo Switch has really no other competitor for handheld gaming, so it can take its sweet time as it keeps expanding its library and hardware SKUs.
Maybe Sony or Microsoft end up being innovative in other ways that lead to hardware growth next gen, but there isn't the same pent-up-market-demand to help them this time, like back in the 2011-2013 generation transition (even Ouya happened because of how much was pent-up), so I think it puts that much more pressure on PS5 and Xbox4 having to be something pretty radical that people just resonate with in droves.
I also think $399 is still the hardware MSRP both Sony and Microsoft want to aim for, which pushes the release date back if they are going for a more experimental design.
So yeah, I think Nintendo is in fairly comfortable position with the current trajectory of things as they continue to ramp up hardware and software this year and next year.