Eh, I think Kafka was infinitely more subtle than that. Framing the story as a mundane criticism of the Church seems to be missing much of the depth of his writing.
On that note, Kafka was also quite interested in Kabbalah, Jewish mysticism, which is almost inversely related to sociopolitical structures.
https://en.wikipedia.org/wiki/Franz_Kafka_and_Judaism
Here's a great aphorism of his that's related to religion:
“Leopards break into the temple and drink all the sacrificial vessels dry; it keeps happening; in the end, it can be calculated in advance and is incorporated into the ritual.”