Modular caterpillar robots moving via locomotion waves play increasingly important roles in completing engineering tasks. Obstacle-crossing ability and stability are their crucial properties. Although the stability examinations in previous studies are similar, there are few unified quantitative approaches to study the obstacle-crossing ability. This study aims to propose proper quantification of the robot’s maximum obstacle-crossing ability, which is meaningful in terms of universality and practicality. This study also aims to design the gait that could enhance the robot’s properties. The enhancement of obstacle-crossing ability is achieved via static optimization, where the quantified obstacle-crossing ability is maximized. The relationship between obstacle size and the optimal wave parameters is obtained. The optimization results of the waves with large numbers of links can be forecast via data analysis, which greatly reduces computational cost. The enhancement of stability is achieved via dynamic optimization, where the moment induced by gravity (i.e., climbing instability) is minimized at every time node. The dynamic gait and the pattern of the moment induced by gravity during each movement unit is obtained. Overall, climbing caterpillar robots moving in the designed gait can make the best use of the wave to surmount obstacles in stable locomotion.