They certainly have.
For example: if a person directly procures an abortion they have committed an offense which automatically excommunicates them.
Say such a person receives the Eucharist from an unwitting priest. He does not receive any grace from it. As the Apostle says, he is rather "eating and drinking damnation unto [himself]" by profaning the Eucharist.
Now say the priest overhears this person bragging about how he encouraged and paid for his wife's abortion. The next time he comes up to the altar, the priest refuses him the Eucharist.
Has the priest withheld grace from him? If the priest had communicated him would he have received the grace of the Eucharist?
By no means. He cut himself off from grace by his evil actions. The priest is merely formally acknowledging something that is already an accomplished fact. This formal acknowledgment, as you say, is part of necessary Church discipline in order to warn other believers of the gravity of falling into such a sin.
Then you are saying that Rome's sacraments and the special powers of her priests have absolutely no effect on the eternal fate of any soul?
Far from it.
The sacraments, among which are included the sacramental ministry of the priesthood, are the greatest helps we have to the grace of salvation. Rejecting them is turning away from the greatest gift God has ever given to man: the Body and Blood of Christ.