Markdown to Omnifocus

Markdown and Taskpaper do not have any sort of defined equivalence. You could create something that converts how you want Markdown to be converted to Taskpaper, but it would be specific to your require, not generic.

The basic premise would be to carry out the same conversion that you did manually. If you can define what you want to do, then I expect you could automate the conversion using text replacement instructions, potentially. Using regular expressions may be beneficial depending upon the complexity.

Fundamentally, it should be possible.

However, would it be viable to switch your template to Taskpaper rather than Markdown? Is it serving some other purpose being in Markdown?