5D Mk III, EF 24-70 f/2.8L II, 28mm at f/16, 1/40 sec, tripod
5D Mk III, EF 100 f/2.8L IS, and EF 25 Extension Tube, f/2.8, 1/40 sec, tripod
All are chosen by the photographer ultimately.
Resolution is determined by the quality of the lens, not the camera, you put a cheap lens in front of a 22 megapixel camera, you end up with low resolution images, especially if shooting beyond f/8 where diffraction starts to kick in.
Depth of field which the photographer selects by choosing the aperture of the lens, (f/1.4 - f/64)
Sharpness is what all of this adds up too essentially, choose a high quality lens, use a method for camera stability and understand depth of field vs diffraction and you will end up with high resolution, sharp images.
I almost never go beyond f/16 in any of my images, 35mm format lenses are just not up to par with medium and large format type glass that can be shot at f/64, but using good methodology and knowing your equipment you can maintain high resolution images that are tack sharp.
I chose the two images above to demonstrate the wide depth of field that can be achieved with good lenses, while maintaining very high resolution and sharpness.