Previous handhelds failed because they couldn't build up a good software library like NIntendo did. Now we have two handhelds (Steam Deck and PS Portal) that don't have that disadvantage. It's not enough to eat Nintendo's lunch at this point but it's a start.
Tbh - I barely consider mobile a competitor here. To play anything that has controls with even medium complexity you'd need something like a backbone, and the whole experience of playing games like that on mobile is just too cumbersome for consumers. I think consumers generally don't prefer all-in-one devices when there is a good streamlined device out there that does what they want.
Yeah I don't think there's anything for Nintendo to worry about on the immediate horizon, but thinking 10 years out the landscape could look different. Valve might figure out a low-cost Steam Deck solution and build up more distribution channels, etc.
Mobile is a competitor in the sense it has greatly diminished any chance to capture or sell to the expanded audience utilizing the selling points I mentioned. It's less about being an all-and-one device, and more so that for the average consumer, the software available on mobile stores - along with the other perks a smartphone brings you - satisfies them enough that paying an additional $400-$500 for a dedicated gaming device without Nintendo software just isn't worth it. This has been pretty much hinted at with the recent discussions concerning the consumer base stagnation of console gaming over the past 20 years, and how the ubiquity of smart devices has likely contributed to younger audiences not transitioning to traditional gaming as they did in the past.
So the audience Sony, Valve, and other potential handheld/portable players are left to cater to are: 1.) those who want a dedicated gaming device that's neither made by Nintendo nor a major mobile manufacturer, 2.) which also has top-of-the-line specs and 3.) plays the majority of PC/home console games. That's a very small niche of consumers to target, especially because among hardcore gaming enthusiast circles like Era gaming on portables isn't popular and preferences heavily skew towards home consoles/desktop PCs.
Valve at least knows and treats SD like niche product, and to be fair it does have a selling point that is unique differentiator from both mobile and Switch.