The ramps board can support 5 drivers. You’ll just need something other than Marlin. I wonder if grbl for ramps can do that?
I guess the part I’m missing is what the 4th and 5th axes would look like. I’ve seen the big robot arm stuff, and I’ve seen 4th axis stuff, but most of those are really just replacing the y with a rotational axis.
Then, as Ryan mentioned, what does the 4-5 axis CAM look like… Not sure on that either. I would guess there are some easy things to do, like rotate a 2.5D design around a cone or something. I could also see just doing 2.5D on different sides. But taking an STL and creating 5D cam seems like magic to me.
Would you just mount the workpiece on something that pan and tilts the work?