Have you tried a zigbee contact sensor? I have one mounted under my mailbox and a small round magnet stuck to the inside of the door and it’s worked well for over 5 years. Obviously battery life depends on the signal. Know I posted a picture of it years ago let me see if I can find it.
Edit: Found it. Had an Xbee before to increase signal to mailbox but did an antenna mod on a C7 and haven’t needed the Xbee. The C8 external will likely be helpful as well: