Note that both very high or very low aperture settings also bring their own optical issues. At very low values (big hole) you’re getting hurt by different aberrations (essentially too many paths the same rays can take to the sensor) and at very high values you’re getting hurt by diffraction. At the low end, it’s good to go a little higher than the lens advertises, and at the high end anything over F13-F18 (depending on the gear) is usually quite bad.