It would be a nice feature if StackOverflow would blank out (####) patterns that potentially match passwords or at least offer this if their system detects a potential password in your post.
When it comes to leaking secrets, don't trust tools. It's hard, it's human, it just happens.
As for what StackOverflow should do — make it easy to fix leaks, which they do a good job at. Ie. users can edit or delete answers, comments after posting them. Even better if there's a means to create confidential back channels with poster or admin if you spot a potential leak.
s1a=: 0j2 %~ ^@j. - ^@-@j.