Since it's Express's default behaviour to merge res.locals I wouldn't know why you shouldn't apart from that with NodeBB this will end up on the client side as well if the template will be rendered there. So yes, then maybe res.globals would make sense to allow a plugin to set global variables for all templates to receive. But then.. that wouldn't allow you to do so only for specific templates. Which again means overhead.
Use of the Markdown composer is optional, and you can save HTML directly into the database, and this is what is used for other composers like Redactor. Still other composers (Quill composer) save content into the database in their own special format.
Markdown is not meant to be activated for either of those.
Alternatively you could allow HTML in the markdown settings, but I would highly advise you also install sanitizehtml plugin, otherwise anyone can post anything including malicious scripts as a post in your forum!