Perhaps I was misunderstanding what you meant. I thought you were saying that this meant the churches, as complete hegemonic entities, could not actually be "good" even if they wished to be, because of the possibility (or, more likely, past fact) of doing evil in the name of good things/beings/ideas. Would it be more accurate to say that you're saying any religion in D&D fiction is simply too big to be hegemonically good or evil? That is, a good church can have evil branches, and that while it's unlikely, it's at least theoretically possible for an evil church to have good branches? That is, the evil is objectively evil, but that doesn't make the whole church evil, nor does the overall church being good absolve the deeds of specific branches or of past members thereof.
In
my opinion, "ish."
Let's say you have a church, and there are two branches to it. One is the branch that goes forth and feeds and heals people, defends the weak, and other good things. The other branch contains the bureaucratic side that includes an inquisition that tortures people until they confess to their crimes, then likely kills them messily. (There are likely more branches than this; we're dealing with these two). The first branch is almost certainly Good. The second branch is almost certainly Evil.
The reason I'm saying "almost certainly" here is depends entirely on what the crime is and who knows about the torture. If the crime is not going to church every week, or associating with haflings because the church has declared Small races to be unholy, or stuff like that, then this branch is pretty Evil. They're hurting people for things that are only crimes because the church has said so, not because the actions are actually harmful.
If the crime is "consorting with demons of disease and misfortune in order to gain powers to hurt people you don't like," then the branch is evil (for using torture) but not necessarily Evil, in the grand alignment sense. However, they probably also wouldn't be
good, either. They'd be more Neutral--they're doing some awful things for the greater good. It's a dirty job, but somebody's got to do it. It would also depend on how much non-torture investigation they did before hand, of course. Grabbing people because their neighbors turned them in would be more Evil, while doing careful research in order to make sure that they only get the actual guilty parties would be more Good.
But, if the crimes (of viewing Small races as anathema, etc.) were edicts handed down from on high--by the literal gods--then I would view the entire religion as being Not Good. The church might be Neutral or Evil, but with a Good branch that heals and feeds the needy. Especially if that Good branch also helps out Small races on the qt. (This is where schisms appear)
If the prohibition about Small races was due to some high priest's personal dislikes that just got codified into not-actually-canon law, or because there once was a war with some Small races and anti-Small sentiment got brought into the church, or the halfling-hating ruler of the land demanded their dislike be made into law, under pain of having the church dismantled and the priests gruesomely murdered, then the church isn't necessarily Evil, because it was outside interference that corrupted them. They could well be on their way to becoming Evil, though, if the corruption isn't stopped before it becomes endemic.