It's hard to avoid, because it happens all the time. That's why there's the exemption that should be in there with regard to good faith allegations being made. The exemption with regard to anything that's done by management as part of its proper management rights and doing its proper progressive discipline wouldn't be considered to be harassment.
You can't avoid the possibility that someone may make a complaint that they're being harassed, but that's why you investigate and that's why you decide on the appropriate manner of investigating. It may well be looking into the history and finding out that it really isn't a case of harassment, and then having it done there, without having to bring in a third party investigator in order to deal with the situation.