This is Furukawa. At today's Corporate Management Policy Briefing, we announced that Nintendo Switch software will also be playable on the successor to Nintendo Switch. Nintendo Switch Online will be available on the successor to Nintendo Switch as well. Further information about the successor to Nintendo Switch, including its compatibility with Nintendo Switch, will be announced at a later date.
At the hardware level yes, software, yes as long as you don’t mind repaying for something you bought previously (potentially) and also don’t mind it being unavailable a few years later.
While they've shut down online services for some of the older consoles, the backwards compatibility of the Xbox has always been excellent. I was playing Crimson Skies for the OG Xbox on my Series S a few weeks ago.