Sounds cool!
If you're planning to use connected hardware, you can use all kinds of communication to interact with your Mendix application. Personally, I would go for REST API's, because it's easy to understand, build en debug, but also connecting it to the Kafka bus with Business Events from Mendix or some custom implementation is possible, like WebSockets or LoRa.
You could use offline hardware, which validates a (signed) QR-code and executes the given command. In that case you can open and close a one locker, but not communicate back to notify about malfunctioning or send measurement information about the locker being closed or emptied.
Good luck!