Firstly, I would note that those comments do not get stripped out when using Markdown Mail, or other methods that output to HTML from Markdown. They are HTML comments, and are not displayed when HTML is rendered, but if you were to view source of the HTML (or email message, etc.) those comments would still be there. This may or may not be important to you, but it’s worth noting, in case you are writing comments like
<!-- what a moron -->.
It would be pretty easy to pre-process and remove HTML comments via script. Something like:
// remove comments
let s = draft.content.replace(/<!--[\s\S]*?-->/g, "");
// setup template tag
// Now use [[cleaned]] in your subsequent message step template
// instead of [[draft]]