You can implement the heavy stuff in C++/Rust, compile it to a dll and import it into whatever engine you want. The hardest part about making a game like dwarf fortress is to implement a good UI, making it run fast is much easier and shouldn't be a priority when selecting engine. Game engine performance is mostly about rendering and not your custom simulation code.
I mean, there's rimworld for an example of "dwarf fortress with better UI but slower simulation". Commercially it's worked out for them, but I do find myself wishing for the scale of DF when playing rimworld. The new game UI does warn you away from even the larger map sizes they do have implemented though.
Rimworld implemented their simulation using unity objects, if they wanted to increase scale they could rewrite it to run the simulations in custom code and thus run just as fast as dwarf fortress. Or faster if you parallelize it well. Then they could just look at the world state and render that every frame, which is super cheap since its just a bunch of 2d objects and a bit of text.