You can absolutely leave long mode once entered; it's just annoying and silly. In fact one of the plausible options for running a DOS on UEFI would be downgrading the mode to 'unreal' mode. But you'd still have to put BIOS replacement code in memory to manage that part.
However the better option IMO is to allow the DOS kernel to just virtualize the applications using the virtualization extensions on almost all modern CPUs. Then you could do something like adding an emu.ini file next to the exe/com that sets things like memory and emulated hardware settings.
Furthermore virtual machine BIOS code already exists for things like qemu etc. so there is a place to start on that too.