Pattern projection-based 3D sensors are widely used for contactless, non-destructive optical 3D shape measurements. In previous works, we have shown 3D measurement systems based on stereo matching between two cameras with GOBO-projected aperiodic fringe patterns. In this contribution, we demonstrate a method to optimize the projection patterns for high measurement robustness, i.e., high completeness of the resulting point cloud with low probability of outliers. To calculate the 3D coordinates of an object point by triangulation, a pixel correspondence between the two cameras must be found. The search for such pixel correspondences can be broken into two parts: a coarse correspondence search and a sub-pixel-accurate refinement. The former is responsible for the completeness and correctness of the 3D result, while the quality of the latter determines the accuracy. The correctness of the correspondence search depends on the property of the projection pattern to uniquely encode each point on the measurement object. If the pattern is very self-similar, the points are not well distinguishable from each other and there is a high probability of mismatches during correspondence search. We introduce a mathematical measure to evaluate the self-similarity of a GOBO-projected fringe pattern. This measure operates on patterns, which we simulate with a simplified 1D model. Based on this measure and its derivatives, we developed an algorithm to optimize the fringe patterns. We compare results achieved with unoptimized and optimized fringe patterns.