I’m using an old (2012) mini with an eGPU. It takes a bit of hacking to get that setup to work at all. Then I had to edit the basic profile b/c Zwift doesn’t seem to know what to do with a radeon rx 5500 xt. In the end the rather ancient cpu seems to be the limiting factor.
If you don’t have the gear already, it would be a pretty expensive and labor intensive solution. In my case, I had everything put together before I ever tried Zwift.