(1) Do you have a fan on your stepper driver chips?
(2) Do you have a fan on your X-motor? It is not strictly something that should induce step skipping, but it would be wise to cool down your X-motor (they run a bit hot to get more out of them. [Actually as a result, not "to"])
At the end of long prints however suggests to me maybe you're overextruding and accumulating bumps, is your infill very bumpy at the part where it starts skipping?
Also
(3) check the Vref value on your X-driver board. It involves taking a multimeter to GROUND on the driver board, and the red probe onto the potentiometer (little screw driver thing) on the driver chip. This will be easier if you have a red sanguinololu board, and not the printrboard (IDK which you have.)