This is more of a theoretical question that likely needs to be tested.
But, in theory, a prime lens will always be sharper than a zoom lens.
In theory, a kit lens balances cost over performance, intended for most people to deliver a better shot than they got with their 'other' camera. Most kit lenses are noticeably less sharp than other lenses in a typical range.
In theory, the nifty fifty will be sharper than the M lens, because aberation is more severe at the edges of a lens, and the EOS-M would not use the edges of the full frame nifty fifty, but instead use the more sharper center of the lens.
In theory, the EOS- M kit lens image stabilization and STM for superior use as a video lens offers more modern features that the nifty fifty, which has no IS and may be using the older focus motor. On the other hand, theoretically, it should be far easier to handhold a 50mm lens for less blur, such that IS is not that significant for most shooters.