LLVM devs are apparently still working on adding proper i386 support
https://github.com/llvm/llvm-project/issues/58470 but if that were to be addressed, we might even be able to use clang or rustc to build proper DPMI-based code for DOS. That would then leave 8086 real mode and 80286 protected mode as the next steps - admittedly quite a bit harder, given the need to deal with the complexity of segmented memory and the related issue of "code models".