The President of Nintendo, Shuntaro Furukawa (古川 俊太郎), announced that the current library of Switch games will remain relevant for the future generation of the console.
However, it's still unclear what exactly the next Switch will be like
“During today’s briefing on leadership policy, we announced that Nintendo Switch software will be playable on the console's successor. Nintendo Switch Online will also be available on the next version of the console,” wrote Furukawa on the official Nintendo account on the social network X.
There is currently no more information about backward compatibility. Nevertheless, the current wording suggests that (A) current Switch cartridges may be compatible with the new console and (B) the transfer of purchase history will be possible.
This is an expected move, considering Nintendo's previous experience with portable devices (Nintendo DS cartridges were compatible with Nintendo 3DS) and the general trend of backward compatibility in the current console generation (PlayStation 5 and Xbox Series support games from their respective eighth-generation consoles).