Sure, sharper lenses will make a higher megapixel count really stand out, but the key thing is that a higher megapixel count will never make an image look worse.
Another excellent reply and food for thought.
Regarding the line I bolded, I'm not certain this is entirely true. Higher MP sensors can make errors in focus more obvious. Assuming the lens is sharp enough, areas in perfect focus will be significantly sharper than areas not in perfect focus. On a lower MP sensor, there can be less of an obvious transition between areas that are in-focus and not in-focus (because even the in-focus area isn't as sharp as on a higher MP sensor), so the focus error might not be as obvious.
Consider a portrait as an example. With a higher MP sensor, it is much more obvious whether you got perfect focus on the subject's eyes or not compared to using a lower MP sensor. With the higher MP sensor, a focus error will result in a sharp cheek, forehead, or ear (or eyebrow or eyelashes in more subtle cases) with the eye obviously not as sharp in comparison. Not as obvious of a problem with a lower MP sensor since the focus error won't be as obvious (everything is a little softer in the image so the difference between in-focus and out-of-focus isn't as glaringly obvious). There are many other variables that influence how obvious focus errors are (lens sharpness, DOF, placement of the zone of sharp focus within the image, image output size/resolution, etc.).
If you *nail* focus (including placement of your DOF within the image), then a higher MP sensor will never make an image look worse. If you *don't* nail focus, then a lower MP sensor can help hide the focus error and perhaps result in a more pleasing image overall.
There are rumors in Leica forums that a future M might have a 40 MP sensor compared to the current 24 MP sensors. For a RF camera, I'm not sure this would be a good move as focus can already be problematic unless using an external EVF. A 40 MP sensor would make a future Leica M even more challenging to use, especially if one has aging eyes. But that's a topic for a different thread
.
I'm getting into the weeds regarding the OP's question. But I thought it useful to comment on this particular aspect of your well-thought-out reply.