When someone’s “gotcha” in a good way, it means they understand what you're saying. They “know where you're coming from”, “catch your drift”, are “on the same wavelength” or have “got your back”. There are plenty of ways to communicate that most valuable human connection. However you say it, the message is a validation and the building block of teamwork.
Taken another way, if someone's “gotcha” in a bad way, they've caught you at doing something (usually wrong) through an act of surprise. In a law enforcement context, that moment can also be a good thing for the people who are being served and protected, but it generally infers something else. The very act of surprise implies lack of trust and the need to launch a sneak attack to see what's really taking place. It's the way of government inspectors and others who make their living by surprising others on a daily basis, understandably for the protection of others who may not have the ability to know what to look for. This approach can serve the public interest; it’s certainly commendable to do the right thing when no one is looking – and a surprise inspection is one sure way to find out.
There's another negative implication of playing the surprise game of “gotcha”. Within a private business, the very act of inspecting without notice can immediately foster a climate of distrust. The inspector may be able to declare “gotcha”, but the discovery won't be accompanied by the goodwill of those inspected. And it certainly won't enhance their desire to comply, except to avoid punitive consequences.
Instead of saying “gotcha”, then, consider the positive results that can be achieved by saying “with-ya”. To say “I'm with you” implies both understanding and a desire to help others improve. That sets the tone for cooperation, trust and accomplishment. Plus it's a much better way to enjoy the journey!