People involved in religion can often find themselves uplifting their own ego because of the beliefs that they have within their religion. Accomplishing things within a church is one way that sometimes can boost or decrease a person in leaderships ego. This can be both a negative and positive thing depending on how you look at it.
Religion can certainly be used as a tool to boost a person's ego, but that is not its purpose. Most religions preach humility and service to others, none of which is inherently ego boosting. Some people misuse religion, but that doesn't mean that all religion is used for ego boosting.