The encoder "reader" wires/cable? You know, starting at that little arm that extends out to Right side and strattles the actual encoder itself. They eventually attached to bottom of sled via zip-ties, then go to the Black rolling-loop cable under the sled, then to pin-plug, then down inside the machine in back left side.
Check for worn area everywhere. Maybe a zip-tie moved and cable got chaffed? Or intermittent connection for the encoder reader?
When sled it at fully forward or fully backwards, the encoder reader is shorted out or lost signal? I think X-limit opto is OK. Look somewhere else?