So let us consider some points.
First, it seems obvious that we don’t want judges to have much say in whether a religious objection is valid or not. But if we rule out any say, a “yes” answer means that pretty much anyone can claim the exemption.
Second, even before we consider the first point it is obvious that we should not let religious belief become a carte blanche to ignore the law.
Third if we really support religious liberty we shouldn’t give privileges that will favour the dominant religion over others. The rights of minority religions are in more need of protection.
Considering these points together, if we’re going to allow religious exemptions to any law we ought to be asking ourselves whether it’s worth having the law at all. It’s better not to have a law than have exemptions - and if we do have exemptions they’d better be narrow.
And that leads to a fourth point. If you want to say “it depends” it better not “depend” on anything that will work in favour of majority religions or allow minority religions to be denied their exemptions.
So, some of these are pretty obvious. We - or rather, you Americans - shouldn’t be making children say the Pledge of Allegiance at all. There’s no need for a special right in that case. It’s equally obvious that religious organisations shouldn’t be allowed to ignore workplace safety regulations. The question of polygamy isn’t much harder - it certainly shouldn’t be a religious exemption, you either allow it or you don’t. As things are now it’s very open to abuse and shouldn’t be allowed. If there’s a wholesale reform of marriage law - and I think there should be - maybe a solution can be crafted.