Since the government doesn’t assign these jobs to people, there is no infringement in forcing them to carry out their duties. They are free to find a different job
It’s like Sikhs and motorcycle helmets; they don’t have to ride a motorcycle so requiring a helmet isn’t infringement though religious wear should be illegal in public anyway as it infringes on other people’s rights