Can a great, and sharp shot be taken at f/22. Yes! Will it be as good as one taken on the same senor at f/8? Well, now that is going to depend on a who host of issues including the performance of the lens at different apertures, the sensor, the need for DOF, proper focus, the lighting, etc.
The attached JPEG shows the onset of diffraction losses for 3 cameras based on some listed general assumptions. The D7100 I already owned and the D750 and D810 that I was considering buying. The point of knowing the diffraction limits is not to set a hard and fast rule that you will never shoot at a smaller aperture than X, but to know that at X, I am starting to have to make trades so that one can decide whether the trade is a worth it. Am I getting something more in return for what I am giving up?
I will usually trade diffraction for DOF. Meaning, I first determine the aperture necessary for the DOF I want. Then I worry diffraction. If I have the opportunity, I usually will take 2 shots. One at the aperture necessary for DOF and one at the aperture where I feel diffraction is too big a trade. This also might require rethinking the focus points for each shot based on the main focal point of the image. Then in post, I compare. Sometimes, I find I don't prefer the DOF I thought I wanted and use the other shot. Sometimes, I pick correctly and use the one shot for DOF. God I love digital!