While it’s true that it would be very hard to impossible to actually detect something like code in pasted content and educating a user about that kind of content-handling would probably suffice it could still be possible to add some kind of “weird content paste”-detection. Let my try to explain:
Something like code-blocks is typically pasted into a response. Since discourse is automatically doing a markdown transformation for the live-preview it should be possible to verify what kind of content has been pasted. If it for example consists of mostly headlines (e.g. 10 headlines and like only 2 paragraphs) it could be possible that a user pasted text which should actually be formatted in a different way (in this case as a code-block). The editor could then show a small notification telling the user that some more work should be done, before actually saving the message.
Still this kind of detection would be very hard to implement and might even use lots of computing resources on the client, which especially for mobile devices might just be too much.