The horses jumping on the level spears is a feature and I suppose this would be easier to do from a higher elevation, but I think it's overdone and too easy for cavalry to penetrate the spear wall even on level ground. For instance, a 54 man cataphract can beat a 122 man silver shield pikeman on level ground with a frontal charge. One thing I noticed about phalanx on slopes is that the spear tips are closer to the ground if there is an upwards curvature to the slope. The men in the phalanx are leveling their spears at the angle of the slope of their feet. I'm not surprised to see this behavior given the lack of collision detection between spear points and objects such as walls. As you say, this is very likely interacting with the feature that allows cavalry to get past the spears by going over them.