Changing direction of problem shows that it is not endstop related but skipping steps, slipping belt or pulley. Try reducing acceleration a bit. Alternatively if using dev version you could also test
#define REDUCE_ON_SMALL_SEGMENTS
which adds slowdowns on small moves with direction change that can cause bigger jerks then visible.