Many people think they know the law on this topic, both for and against.  But the truth may surprise you. https://www.ehstoday.com/health/article/21127723/can-employers-test-workers-temperatures

In short yes. Employers must review their procedures with legal counsel and ensure they are taken in a non discriminatory manner. If data is retained, it falls under an OSHA health record thus protection and retention rules apply.