Without adjusting too much of the smartapp and DH code, you could utilize webcore to incorporate both sensors. Build a rule that looks at the status of both sensors to set the status of a simulated contact sensor (i.e. sensor A is open, sensor B is closed then gate sensor is open). That simulated contact sensor would be the one used in the smartapp as is.
Doesn’t help much with the opening/closing feedback but it’s a start especially since everything is functional for you at the moment.