I think you might be conflating a couple different concepts here. Most often when level designers and environment artists talk about modular building, they are talking about building libraries of objects that can be combined to build larger scenes. In the library they will have both static and dynamic objects depending on what the object does in the world. A curtain, or a flag for instance will be dynamic because it will have physics applied and deform. A section of wall, floor, or column would most likely be static.
To build a dungeon hallway modularly, you’d build small floor sections, wall sections, ceiling sections, decorative pieces, and lay them out in the editor into a hallway. Save that as a level. You’d then light it and bake your lighting for your static meshes. This is what you are seeing in games like Skyrim. There may be parts of the environment that are populated procedurally, perhaps even at run time, but most of the level is constructed by an artist/designer by hand in an editor or 3D app using a collection of modular pieces and unique geometry purpose built for that area. Most of the geometry is static and light mapped.
I gather what you are interested in is either a fast way to procedurally build levels in the editor, or at runtime. Is that correct? If it’s about building things quickly with modular pieces, that’s what Unreal’s editor is all about and you can further that capability, using a tool like Houdini Engine to build assets. If you want to procedurally build dungeons at run time, you will need to consider switching to an art style that is not constrained by lighting. Most procedurally built games have simplistic or stylized art styles for a handful of reasons, one of them being that light mapping static geometry is a time intensive process and not something a player is going to wait to have happen while the level loads.