Selling Alcohol
@AhmadShoaib please see this video, similar logic can be applied to your question of donating/building the polytheistic worship places like temples.
Actually I think Ghamidi sahab means if there is no other way. So he is also talking from the point of being forced basically
Each person can take a view on their own situation and they will know if they can give an excuse in front of God. Commenting on scenarios like this would be dishonest to the reality and complications of a situation