Contrary to Western experience with Christianity, Islam, and modern Judaism, most religions, including the polytheistic religions on which most D&D worlds are based, [don't have a concept like Heresy] .
Heresy was not really a concept outside of monotheistic Western religions. There is no need for it. You can just glue together different deities from different places and make a polytheistic pantheon. It's just that the local guy is boss in the Pantheon, and the others are his sidekicks.
Deities merge identities and pick-up aspects very fluidly in syncretic religions. Consider the career of the Roman Sun god portfolio. In Rome the original sun deity was this concept of Sol, apparently almost unrelated to the later Sol, but we'll get there. Eventually, some foreigners (Greeks likely) setup one of their weird altars to one of their foreign gods on the outskirts of town. Apparently no one paid them much attention until they really helped out during a plague. (This could be straight out of my campaign, but
isn't) After Apollo had a proper temple built on the spot, he gradually became a more and more accepted part of society. Soon, nobody in Rome worshiped Sol anymore, and he was forgotten basically.
Apollo himself constantly was evolving in the ancient religious world. The original Greek version possibly was not even associated with the Sun. Aspects of Apollo include scholarship, prophecy, medicine, and various aesthetic arts (but especially music). Additionally, Helios and Phoebus were other Sun deities sometimes conflated with Apollo, sometimes viewed as separate entities.
Eventually a cult of Sol Invictus with disputable connection to the old Sol arises in the later empire. The installation of Sol Invictus as the most important deity in the Roman Pantheon was intermittently achieved by various emperors in the later empire. The first such installation was done by one of the
Severan emperors, although this was largely an importation of a Syrian cult which did not last long after he was assasinated. Still, it is the best evidence for a point where Apollo's worship gave way to Sol Invictus. The
Aurellians were a later series of emperors who put Sol Invictus at the center of the Roman pantheon, arguably in an attempt at unifying the theologically diverse Roman Empire into a single cult more in line with various local theologies (many of which put the Sun as the most important deific sphere of influence).
In a campaign setting I would frame a religious theological controversy as a literal conflict (on the Great Wheel of Outer Planes) between distinct deities. Different deities would have different means of approaching this conflict as you describe:
There's an anti-clerical populist (the Heresy of St. Ilia) sect which opposes the practice of selling the raise dead ritual (called 'resurgences' in their rhetoric), decrying it as a tool of the elite to stay entrenched in power, a sacred power pawned off to the highest bidder, a denial of judgment for crimes committed in life, carrying even greater weight than beseeching a king to pardon a victim sentenced to die.
A Justice deity may intervene in some cases where a grave injustice is being wrought.
A Robinhood-esque Thievery god could possibly steal the life giving energies of the spells and use them for the poor disenfranchised members of society. Or just make it so the rich have less money in general with which to buy these things.
Another possibility is that the cult of the god has been infiltrated by imposter priests or even that the god itself has been temporarily replaced by an imposter deity. The worshipers of the false god are channelling the resources of the true god to the imposters as well as being granted spells by the imposters (who could be anything from a coalition of handful of wannabe demon lords to an outright Greater Power from the Lower Planes). This is in some sense kinda like a squatter (the imposters) on a piece of private land (owned by the true deity). In this analogy it should be kept in mind that a deity is likely to have several "estates" of worshipers in different countries or possibly on different Prime worlds, so a squatter could potentially squat unnoticed for a good while.
Perhaps the most interesting possibility is that of apotheosis. It could be that the original god is slowly being corrupted and is in fact moving across the Great Wheel towards a more sinister place. In this case, rather than an existing greater power or lesser power extending their influence into the vacated theological areas (as in the examples of a Judgement deity or a Thievery deity) or some other extraplanar NPC, it could be that some Prime character (maybe St. Ilia, maybe even a PC) could be on a path to rising to the status of a Demi-Power. I would imagine that Powers in general start out as a person who gains a following and starts to essentially be able to grant
themselves divine spell casting, and eventually a few others as their flock grows.
In any case, the likely result is in fact a literal outer-planar battle between ideological forces representing the original power and other forces representing the usurping power. Each side in addition would be constantly attempting to marshal "supplies" for this battle from the beliefs of Prime mortals, providing plenty of fodder for a campaign.