Looks to me like it could be a capacitive moisture sensor. The
7404 is a hex inverter; likely two or three are used to form a primitive oscillator, with the capacitor defined by the moisture detected. But why a regular inverter and not a Schmitt-trigger inverter? Maybe you have some ideas @NickAlexeev