As the Dean of Saint Patrick's Cathedral, Swift often worked religion into his political writings. He defended established religion his whole life, despite detesting every other form of authority. Here's the confusing part: Swift criticizes his Protestant peers in A Modest Proposal. He suggests that his wealthy friends might not care about the poor Catholic population because of their religion. The narrator even suggests that as an added bonus to his proposal, the number of Catholics in Ireland will significantly decrease.
You can see why Swift's religious works were often misinterpreted. He liked to take controversial stances that didn't necessarily reflect his position as the Dean.
In A Modest Proposal, Swift suggests that religion fuels animosity between the poor and rich. In spite of this position, he remains respectful to the religious beliefs of individuals.
Swift takes a particularly harsh stance towards wealthy Irish Protestants because many of them are his parishioners.