Good religion is allowed to use the dark side of humanity to achieve good ends. It can use envy to inspire hard-work, anger to inspire justice, groupthink to maintain harmony, etc.

And who gets to decide what the “good ends” are? The authority figures of that religion. Ideally, only enlightened people are allowed to join the rank of authority figures.

However, a good religion must satisfy this condition: it must actively encourage enlightenment of its followers so that they can master their own and others’ dark sides. A religion that does not do as such is a cult where the leader uses the follower to do his bidding.

Another condition that a good religion must fulfill is: the authority figures must manage those who are yet to be enlightened so that they don’t become to fanatic and cause harm to themselves or others. A religion that does not do as such is an extremist organization that can create instabilities and can cause many unnecessary sufferings.

These conditions apply not only to religion but also to any kind of ideological institutions that direct world view and way of life. Some examples: feminism, popular atheism, idol’s fanbase, etc.