As far as I can tell, the vast majority of macOS shortcut keys are not modifiable using the System Preferences app. Can you show a screenshot from the System Preferences app that allows this particular key to be modified? I can't find it.
It does still seem able to bypass Keyboard Maestro. Intercepting Cmd-M works using the software BetterTouchTool. I use it to make Cmd-M trigger "Zoom window under cursor".
Yes, I did recall that and I think in general when talking of BTT here it tends to be in terms of it being something quite different from KM, in philosophy and in practice! It can be a useful complementary piece of software.
Sometimes – for me, at least – the wrong window is zoomed by BTT but I find that far less annoying than the window being squirrelled away if I accidentally hit Cmd-M!