A potentially perfect solution: Someone over at Discourse has developed a Code in Post Detector. It pops up a message saying “It looks like your post may contain formatted code” and gives the markdown for block code. The message content can presumably be customized.
The announcement contains links to its GitHub repo and some installation instruction. The most recent GitHub repo activity was last month, the March 2019 thread announcing the plug-in was active up to this past January 2022. The plug-in is endorsed/sponsored by Sam Saffron, a Discourse co-founder.
You can access the demo HERE.