I'm wondering because here's what I am thinking. Religion is inextricably connected to whether something seems like the "right thing to do." Often, people struggle with what the "right thing to do" is, and they ask their religious advisors for advice. Suppose that a religious person advised that the right thing to do for "God's forgiveness" was to file *this legal document with *that court and argue *this point. Would that religious person have a defense against the UPL? Assume this advice was otherwise UPL and assume the religious advisor is a bona fide religious advisor. Has this type of situation ever come up before? Also, what are the liabilities of "holy" advice, outside of just the UPL?
"Unauthorized practice of law" is not as broad as you appear to assume. If you falsely claim to be a licensed attorney, or if you engage in activities reserved for licensed attorneys (representing a client in court as their attorney, for example), then you would be in trouble. You have a First Amendment right to express your opinion on what the right thing to do is, and that is not limited to opinions motivated by religion.
Assume this advice was otherwise UPL and assume the religious advisor is a bona fide religious advisor.
As far as I'm aware, the only special treatment given to "bona fide religious advisors" under the law is that certain conversations may be privileged; that is, the parties to some conversations involving "bona fide religions advisors" can not be compelled to testify to the content of those conversations.
Provided "this advice was otherwise UPL", the "bona fide religious advisor" has engaged in the unauthorized practice of law. If there is evidence of such outside of privileged conversations that cannot be admitted into evidence, then it should prove straightforward to successfully prosecute the case.