Thermodynamics of polydomain heterostructures. III. Domain stability map