Generally, there is nothing to stop users from inserting distracting elements in their posts, either title or body. (It can be emoji in a title π’ π π π° π± π² π π π π π or a cat meme in post body, etc.)
With the rare exception of trolls, users do it because they don't realize it's distracting. So, help them by editing the post and explaining (for example, in the edit summary) that this sort of things should not be used.
Stack Exchange does have the ability to block certain titles by a regex match. For example, on Mathematics site $$
is blocked in titles, which is meant to disallow displayed formulas in titles. This was done because there was enough such occurrences in practice, not because of "someone could" concerns. (Mathematics gets over 100 times as many questions as Engineering, and the proportion of formula-heavy posts is also higher.)
On Chemistry, LaTeX/MathJax formatting is strongly discouraged in titles, but there is no software-enforced ban; users edit it out. I think this is the best course of action: when you see a badly formatted post, edit it.