While I don’t have a deck specifically, I do all my gaming (including DOS stuff) on Linux, and it works great.
For best results, you’ll want a version of DOSBox that uses SDL2. I recommend dosbox-staging or dosbox-x, both of them are quite good. The main challenge will just be using the dosbox keymapper to set up usable control profiles for different games so you can play without using a keyboard.
There’s also 86Box if you want a maximally authentic experience, including setting up the BIOS and installing DOS itself. I’m not sure if it supports controller mappings though, so it might not be as suitable for deck use.