Designing Smart Energy Systems in an Industry 4.0 Paradigm towards Sustainable Environment