You could probably use Pandoc to do this yourself, but again I'd stress that Markdown is really not meant for rendering PDF or Epub content: https://pandoc.org/
This is your problem. You’re thinking a mole hill is a mountain. Tech dorks liking markdown doesn’t mean much.
In general, Markdown's use case is for easy editing of basic formatting in simple documents. Perfect for notes and small bits of documentation. Not perfect for many other things.