How can the integration of phase change materials (PCMs) within structural elements be optimized to minimize thermal bridging in building envelopes, and what role do machine learning algorithms play in predicting and enhancing the thermal performance of these hybrid systems under varying environmental conditions?