Yea no problem. I’ve tested the sensors and they are a good fit for you goal.
I can’t remember if the sensors also output light level readings also but if they did you could use that data to detect open doors if the light levels outside the lockers are always high.