+1 to the “moderation rule”
If you make it a moderation rule to disallow all caps, then your mods and/or bot can implement the rule and hand out punishment.
You can’t change what users send to your chat. But you canb tell your users off for breaking rule(s).
Sure in a “overlay that displays chat” you can do what you want, but I think the problem you describe is a “how to moderate my chat” question rather than a development question.