Asking is the biggest thing. I actually am someone who doesn't wholly mind when judges who are affiliated in some way with competing teams judge. Maybe I am naive, maybe I put too much faith in judges, I'm not sure. But I personally believe a strong panel won't be influenced by one judge with an affiliation to a competing team. People go to comps, they make friends. A lot of the time, teams share dancers too. Its inevitable, and honestly don't think its necessary to only find judges who have no affiliations whatsoever with anyone.Something @naachdicle did this year that I really appreciated is that once they decided on their panel of judges, their judges liaison reached out to each of the team captains and made sure they were okay with all of the judges and more specifically the ones that had some kind of affiliation with a competing team. This gave each team a chance to speak up and express their concerns BEFORE the competition rather than after (when placings have already been decided and it becomes easy to point fingers for those that are upset with placings). Nowadays its basically impossible to have a qualified judge who also has zero affiliations with competing teams because the judges we usually respect and value gave rise to successful teams that still compete today. In my eyes, most of the time you can't have one without the other!
At the end of the day, find judges who you want to represent your panel, and then make sure all the teams are on board with them judging. If both steps get cleared, there shouldn't be any backlash afterwards.