On Lipschitz optimization based on gray-box piecewise linearization