Well, I suppose it is the kind of system where a lot of weird non-deterministic things can happen.
What kind of sensor are we thinking of here? Optical? I know it's a real issue to find something that doesn't foul or misread even in the simpler application of an RV septic tank.
I wonder if you could just put a window in the U-bend for manual inspection. It's supposed to be full of "clean" water most of the time anyway.