This article proposes a novel framework for the rapid implementation of automation programs in industrial heating and cooling systems. The global push for sustainability necessitates significant infrastructural transformations within these systems, which currently rely heavily on fossil fuels and are responsible for 75% of industrial final energy consumption. Our research highlights the critical role of design patterns and object-oriented programming principles to address the complex integration of additional energy converters and storage into automation programs. By leveraging design patterns, our framework encapsulates the intricacies of various components, such as actuators, sensors, and storage, within a comprehensive object-oriented model that also allows the integration of different control strategies. Qualitatively, this approach enhances the reusability, scalability, and adaptability of automation programs. Therefore, quantitatively, our framework enables a more resilient and efficient energy system. The framework is validated through its application to a complex, cross-linked industrial heating and cooling system at the ETA Research Factory of the Technical University of Darmstadt. Using the developed framework reduces implementation effort significantly due to its consistent and modular structure resulting from the reusable design patterns.