There's a similar question here but the scenario and objectives are different. The author cares about "just making it work", while I do also care about performance and efficiency.
What I'm trying to do is having a main GUI and on top of that applications/programs in the form of containers (such as Docker). Think of something like QubesOS.
The main GUI is Wayland and it'd control the taskbar, start menu, window borders but nothing else (basically a simple window manager like IceWM). On top of that I'd run containers with a streamlined Linux kernel + X server + app code. So isolated X applications on top of the main Wayland system.
The issue here is that I don't quite understand how to run such containers without also adding the overhead of Xwayland, like the answer mentioned above explains.
So, can an X server be directly run in the isolated container instead of relying on Xwayland?