Using a door-/windowsensor as a binary device is a great idea!
I use a Aqara door-/windowsensor for detecting whether my doorbell has been rang for instance.
The Aqara’s are reliable, very small and cheap (see AliExpress).
But in theory you could use any door-/windowsensor as long as it has coverage at the place where you want to use it. Some soldering experience (and iron) might be helpfull, as the contacts to use might be very tiny.
Furthermore it might be helpful if you can invert the function of the sensor. As sometimes the state has to be “normally open” instead of “ normally closed”.