Sounds like it woud be a kludge, plus it would be difficult to configure 3 iMacs to run a single multi-core program (if that's even possible).
The top M4 iMac has 4 P-cores and 10 GPU cores.
Even if you could somehow link the 3 iMacs together to run a single MC app, there would likely be losses from whatever network connection you used, so you'd probably get significantly better performance from a top M4 Pro Mini (10 P-cores and 20 GPU cores) or entry-level M4 Max Studio (10 P-cores and 32 GPU cores).
The only downside is that if your budget is for 3 x M4 iMacs (≈$5k), you won't be able to afford 3 Retina-class external displays.
Your best bet would be to buy an entry-level M4 Max Studio ($2,000), add an Apple Studio Display ($1,600) as your central monitor, and add two 27" 4k's as your side monitors (2 x $500 = $1000), for a total of ≈$4,600. That would be a far better setup than 3 x M4 iMacs, and cost the same or less.
I find the resolution on the side monitors isn't as critical, since you spend most of your time looking at the middle display.