A maubot that redacts text messages that isn't in a thread.
Invite it to your room, give it moderator permission (or whatever is necessary to redact messages), and it will delete text messages that isn't in a thread as they're sent.