I having a proofreading project and have been storing structured text using an s-expr serialization of XML. But MD is just so convenient that I decided that starting from scratch and building around the idea made sense. I considered typst for a while but... while it is a good intermediate format if you want to produce PDFs, it is not a good and permanent storage format. Even looked at quarkdown I believe. Same opinion.
So I came up with a mini markup language built around directives and fenced blocks. A simple template import allows MD semantics (the stuff I care about) in the project. The idea is that the core is stable. You simply write schema validators for your schema and transformers for the output format. Probably 2-300 lines of python all-in-all for a "book+chapters" schema with an html transformer.
I did not fall into the trap of implementing a Turing complete programming language in it like so many other systems. If you want behavior, piggyback on directives and write a python transformer to manipulate the AST.
I got interested in something else soon after, so it will probably be a few more months till I have the time and the inclination to finalize and publish everything.