You may be right. I chose alcoholic because suggesting they try drinking to solve one problem will cause other problems for them. If I were to try attending church in order to make myself happy, I would find myself 1) tortured by the inanity of everything that goes on there and 2) pained by the experience of behaving outwardly in a way that conflicts with my values.
However, there are also plenty of people who were raised religious who are now atheists. I've met many of them who have the same toxic relationship with religion that an alcoholic has with alcohol.