IIRC, Jan didn’t threaten to fire them. She simply asserted that unionization would cause them they would lose their jobs because Dunder Mifflin would close down the branch if the workers unionized, as apparently had happened at another branch.
So not advocating that we use The Office (a sitcom) as a reference for American labor law, but I think Jan’s statements might be permissible. As long as her reasoning is that the increased cost of the workers being in a union will lead to the branch closing, not that the branch would be closed in retaliation, it would be fine.
Companies can and often do complain that if workers are in a union, the company’s operating costs will increase, which will consequently have adverse effects on the workers like layoffs, plant closings and so on.
To be clear, this is my understanding of legal issues in a sitcom. I am not necessarily advocating Jan’s point of view, our labor laws as they stand, or anything else.