Problem with error detection and such is that it takes TIME. Better to build the encoder and wiring for reliability rather then trying to clean up a dirty signal.You also want a circuit that can function at a higher rate than the operating rate so you don't lose counts because the decode circuitry can't keep up. Make sure the errors can't get in is generally easier than trying to figure out how to catch errors and correct them.