Like I said, there have been similar court rulings in US. Look up Stephen Cavanaugh for one example.
So, yes, it does apply in US as well - you have freedom of religion, but it has to be an "actual religion", whatever that means. Things might have been different if the Constitution just spoke of freedom of consciousness or some such; but we have what we have.
This, by the way, is one of the reason why the Satanic Temple has been a lot more successful with its lawsuits so far (e.g. https://religiousreproductiverights.com/lawsuit-status/lawsu... - but also numerous cases where a mere threat of a lawsuit causes the local government to change its tune) - because it tries to present itself in a way that makes it clear that trolling isn't the only thing it is about.