It's a short story that I read in a book at some point in the 1990's. It was the French translation, so it might have been older. I believe it was a short story by Isaac Asimov, set in the early days of the Galactic Empire from Foundation, but I may be wrong.
The story had someone sent to visit an asteroid colony, might have been a mining colony, for some reason. The visitor is a sort of official and soon realizes that there's something wrong when he interacts with the local officials, and he's told the guy in charge of maintaining the plumbing is on strike.
Short explanation ensues and the visitor learns that no one in the colony would make direct contact with the plumber because he is unclean thus outcast, since he also deals with waste and the dead. Visitor offers to go negotiate on behalf of the colonists because he's not bound by their caste system, to which the colony official happily agree. The negotiations go well and the plumber resumes his work.
However, when the visitor tries to go back to the colony, he finds the way blocked and he is directed, through automated doors and voices coming out of speakers, back to his shuttle and asked to leave the colony because, since he was in contact with the plumber, he's become unclean too thus the colony officials cannot get in contact with him anymore.