(*edited: always power-down & discharge your printer's power, like you would a computer, before messing with the inner-workings nearby/of electrical components.)
the encoder sensor is held on by a single gold phillips screw on the backside of the carriage visible behind the dampers and to the right of the head height adjustment bar. it cups the encoder strip and lifts-out easily once the screw is removed.
two lenses, one on each side of the sensor, look for anything obstructing the light passing from one side to the other.
(loose connections & proper seating of the sensor should also be considered.)
currently digging through old threads, as I know you're not the first to have a slant/step problem and i'm curious if this was even an encoder issue.
edited: found another
thread regarding a step issue. unknown resolution, boards/capacitors/encoder sensor was suspect.
definitely start by checking the encoder strip/sensor, as it is the lesser of potential evils