Sorry, my message isn’t about the actual proposed feature, but the case you’re mentioning.
Flagging direct messages works.
Are the nasty messages flagged by the recipient(s)? If they are, why not apply a standard moderation procedure? I.e, give a warning and let they know that the’ll be suspended if they continue to post these messages?