2024. As long as games not developed on NS first will be developed for PS4 and XBOne too, there will be little or no difficulty at all porting them to NS too, but when most games not made for NS first will be developed for consoles with 12GB to 16GB RAM on entry level models, and moreover developed for recent SSD's, porting them to a 4GB RAM machine with slower and very much smaller internal storage (and even slower card based expansion), will become very hard or impossible, so while 1st and 3rd party exclusives and multiplats developed on NS first could be fine forever, to keep good relationships with as many 3rd parties as possible, Ninty will need to release a new machine when they need it. Scalable engines, and devs increasing max GPU usage faster than they increase CPU usage, mean that Ninty will still be able to keep power lower, competing, home-only consoles, and graphics RAM or the part of unified RAM used for graphics won't need to be as big as in competitors, but main RAMused by the CPU will need to be almost as big as in competitors (some savings will be possible with a more frugal OS and having to cache smaller textures, but a total 66% saving, as it will be keeping a 4GB machine compared to 12GB minimum competitors, will be impossible), and internal storage too will need to be much larger and faster, although smaller textures will allow some savings in size and speed.
Anyhow, considering competitors use Zen 2 CPU cores, NS will be able to get the necessary power from latest or almost latest 2024 tech ARM or Zen CPU cores while keeping power consumption within hybrid console limits (battery tech improvements will help increasing these limits, making things even easier).
So we can expect NS2 to be very powerful without killing battery autonomy and costing at launch no more than NS.
This anyhow doesn't mean sudden death for NS in 2024, as long as devs want it will still receive new games (and while the most HW demanding games won't be portable, the huge user base NS will have then will make desirable for 3rd parties to port any game that can be ported), and as long as Ninty wants it will be produced, just like DS and 3DS before, and until NS2 price will drop enough, ther will still be a market for NS1 too. NS lifecycle could easily reach and surpass 10 years, even with NS2 coming in its 7th year.