Exploring Stability Landscapes for Optimal Material Design: Application to Wetting of Structured Surfaces