calling this facial recognition is a bit of stretch when its more akin to "is a mask present?", not trying to match to people in a database. No different then self driving cars detecting a pedestrian. very far from unethical (although i would hope they would make an effort to accommodate all skin colors to not unintentionally discriminate against anyone.)
Facial recognition with masks is already working [1]. So storing facial images of all customers entering store with or without mask is essentially the same.