A priest can be the worst person in the world but if that priest has a valid ordination and has not been kicked out from a Catholic viewpoint the sacraments are valid. This controversy goes back to the 4th century. The CC teaching on this goes back St. Augustine.
You see as an ex-Catholic, this argument about their sacraments being valid just doesn’t ring true. How can they be valid if they are coming from a sinful vessel?
And please don’t tell me that old, “if you are thirsty in the desert and the only water you can drink comes from a rusted pipe, would you drink it” analogy.
That analogy throws out all other “good” priests and all other religions as well.
St. Augustine? Of course he is the guy who did whatever he wanted, with whom he wanted and later “apologized” after he saw the emptiness of his actions. He also was a big misogynist. So no wonder, the man believed that way.