Not too long a go, a user asked me to add support for the Waveshare ESP32-S3-ETH microcontroller in my HubDuino project. Now that this has been added, you could DIY your own contact sensor that uses a hardwired Ethernet connection instead of WiFi. The wiring for a traditional reed-switch contact sensor is just two wires - one to the selected GPIO pin and the other to the GND pin on the microcontroller board. This little board even supports Power over Ethernet, which could help to eliminate even more wires.
Just another idea for you to consider.
Note: The link above includes a tiny camera. You can buy versions of this microcontroller without the camera to save a few bucks. There is no support for the camera in HubDuino.