Ah, Mr. Rudlin. You have uncovered medium format's dirty little secret. I congratulate you. But now, you must die, to protect the secret! Guards, take him to the shark tank!
Maybe I should get out of my Bond villain mode to discuss this further...just give me a second to set this ridiculous cat down
What you've hit upon is that in a scenario where a wide depth of field is required, whatever IQ gain you make from the larger sensor and more resolute longer focal length lenses in MF, is instantly eroded by the greater diffraction arising from the requirement of using a smaller aperture (larger f-stop value) to achieve that equal DOF.
Yes and no.
You are correct in thinking that diffraction is an absolute: all systems operating at a given f-stop, like f/11, have the same linear resolution, and for a given pixel size, all systems operating at the same f-stop are equally affected by diffraction. But there are other factors which come into play too.
This is an old debate, going back to the film days. Once you factor in DOF and diffraction, why use 4x5 inch sheet film or 6x7 cm rollfilm over 35mm? Then, as now, the winning argument was that even if a 50mm lens at f/11 projects a smaller but identically resolved image to a 100mm lens at f/22, spreading the same FOV over much more film real estate always gave you finer grain, better tonality, and actually greater sharpness and detail, because your optical system is rolling off at spatial frequencies where the film itself has much higher MTF.
Then, as now, using a system where the lens or film back could be tilted to avail of the Scheimpflug principle also neutered the problem - it decouples the taking aperture from determining the depth of field in the plane of interest.
And if you can't use tilts, then with Bayer pixel arrays, it is better to drop a diffraction-fattened f/16 PSF onto the pixels than to drop a narrower f/11 PSF onto the same size pixels in a smaller format sensor. If neither camera has an anti-aliasing filter, there will be more colour moire with the f/11 PSF. Or if the smaller format sensor has an AA filter to avoid moire (they nearly all do), then it is basically smearing the PSF out to a similar extent as the medium format system with more diffraction. Thus the image quality per pixel is about the same, but the MF system still has more pixels.
And finally, there will be many times when you will either be shooting something at "infinity" and have no DOF concerns about the foreground, or when you want to exploit the thin DOF of a fast lens wide open - and then you will get the full benefits of MF lenses and sensors, with no concerns over stopping down and diffraction.
Ray