A lesser-known feature of Pandoc that I love are filters [0]. They allow you to manipulate the document tree mid-conversion before the output is generated. I've been working on a forked Pandoc filter that executes code blocks with Jupyter kernels, and then inserts the output [1]
[0] https://pandoc.org/filters.html
[1] https://github.com/jacobwhall/plaited