Lenses tend to be sharpest about two f/stops closed down from wide open (e.g., f/5.6 for a lens with maximum aperture f/2.8). So, the entire print would be sharper at that sweet spot but depth of field would not be an affected factor in the image. It is set when exposed in the camera. A similar effect, depth of focus, does exist in an enlargement situation, but increasing it by using smaller apertures again only affects the overall print sharpness for example by bringing the edges of the print to greater apparent sharpness when one has actually focused on the print center. It is the apparent sharpness range of the print image, but has nothing to do with the subject depth of field.
At some enlargement f/stop, this sharpness all falls apart due to diffraction. You can observe that effect by looking through a grain magnifier as you progressively stop the lens down after initially focusing the grain in. It will sharpen up to a specific aperture and then turn to mush beyond that.
Joe