The Hard (and Hypothetical) Police Officer / Establishment Clause Question

I have no sympathy for police officers who simply disapprove of Islam and therefore don’t want to go to Law Enforcement Appreciation Day events at mosques. Here, though, is the hard question: Say that law enforcement wants to send an agent to infiltrate a religious group — assume there is ample reason to justify such an undercover surveillance assignment — and that this infiltration would necessarily require the agent to participate in prayers and other religious events.

If the agent objects, would requiring him to go despite his objections that violate the Establishment Clause, because it would involve coercion of religious practice (something that both the liberal and conservative Justices think the Clause prohibits)? Or is the Establishment Clause no-coercion principle less binding on the government as employer than on the government as sovereign, just as some other constitutional rules (such as the Free Speech Clause and the Fourth Amendment) but not all other constitutional rules (consider the Equal Protection Clause) are less binding?

I suspect the issue would rarely come up, because if an agent mentions his religious objections to his superiors, they will usually conclude that the operation would go better if they send someone who has no such compunctions; and since the operation likely requires only a few participating undercover officers, they would probably have a long list of possible targets. But it still strikes me as an interesting question.