By DS, I hope you're talking about a New 3DS, perhaps XL, and not the older DS models. Installing CFW on a New 3DS is pretty easy, and whether you buy your games or pirate them, there's a giant library that could easily keep you occupied for 20+ years. Even if you stay offline. You can also run emulators, ROMs, and other homebrew to get even more use out of it.
If I was to buy a Switch, I'd want the OLED model, but they're difficult to mod. Unless you have good soldering skills, you'll likely have to pay for someone to install a modchip. That being said, the Switch is significantly more powerful than the 3DS. Will eShop be down for Switch in 20 years? Unfortunately, most likely. But with piracy, or games on cartridges, you could easily enjoy your games in 20+ years. The Switch can also handle emulating a lot of games that a 3DS just doesn't have the power to.
Either system would be fine. I'd lean toward the Switch, unless you really want something that can easily fit in your pocket, can be modded without soldering, and should be a cheaper price point. I have collected every console Nintendo has made so far, and they all still work, as long as you take good care of them. The only exception is the Wii U, mine works, but they're known for bricking because of cheap NAND chips, particularly from consoles sold at launch.
I'd highly recommend playing Dance Dance Revolution, if you're at all interested. Very fun way to burn lots of calories. There's an open source clone called StepMania. If you really end up enjoying it, you're going to want to invest in some high quality metal dance pads. Worth every penny though, in my opinion.
By the way, I'm 400 pounds. I know your struggle. I've lost well over 100 pounds playing StepMania before. Unfortunately I've had some bad events put me in a bad depression, which caused me to gain it back.