Undoing community wiki is a very small part of a moderator's activity, and there aren't any official rules. So I can tell you my own criteria, but there's no guarantee that another moderator will see things in the same way. Note that I'm a moderator on some Stack Exchange sites other than Stack Overflow; some sites may have their own policy (but again it's something that comes up so rarely that I doubt anybody's come up with an extensive policy).
There are three reasons why a post would become CW involuntarily: if it's been edited by its author too many times, if it's been edited by others too many times, and if the question has received too many answers.
In the case of a question with too many answers, there's not much we can do: any time someone posts a new answer, the question and all of its answers will be re-wikified. The measures here are more preventative: protect a question if it receives too many answers from new users that end up being deleted (that happens automatically after three deleted answers that protecting the question would have blocked); close a question if it's too much of a poll.
If the post is an old, long one that has had many minor edits that came in naturally to fix minor issues, or to update it based on remarks in comments or on changes in what is being described, I would tend to remove the CW status. If a post has been useful for years, the continued attention it's received through edits reflect the quality of the post, and the author should keep being rewarded for it.
If a large fraction of the edits come from an edit war, I'll remove the CW status. It takes two to engage in an edit war, and there's no reason to penalize the author for that.
If the post started out as a fastest-gun-in-the-west placeholder and was gradually fleshed out to something decent, I'll leave it wikified. You can have it fast, or you can have it last, pick one.
If the post started out small and a large fraction of the current content comes from edits from other people, I'll leave it wikified. That's what CW is for: collaborative posts.
I'll be far more prone to un-wikifying a question than an answer, because the answers to a CW question are also CW.
This isn't an exhaustive list, just some common patterns. (Common as in, I may have seen them arise at least once, not necessarily on a site where I'm a moderator.)