This is my situation:
(1) Accessing as "Teacher" (role).
(2) Sent a message to one of the Participants (student role)
(3) Try to delete that message
(4) Message can not be deleted (permission denied)
The reason why the teacher can't delete the message is because the user has the role of teacher in the course context, whereas the capability to delete any messages on the site needs to allowed for a role assigned in the system context.
Thus, to enable a teacher to delete messages you need to:
Note that it is fine for a user to have the role of teacher in a course and also a system role.