The integration of the digital twin technology into the learning factory environment provides a completely new approach to teach sustainability and balance between economic prosperity and environmental responsibility. Digital twin as virtual replica of physical systems offers a platform to explore different scenarios as a result of the decision-making process. Students or industrial partners are empowered to study the consequences of their decisions regarding resources, resilience and sustainability which are pillars of the new industrial paradigm – Industry 5.0. Depending on the specific challenges of the system, specific methods are proposed to identify inefficiencies, bottlenecks, or specific areas of interest. This process involves analysis of system performances under different conditions. During this, specific algorithms are developed enabling at the same time adjusting of input parameters, reconfiguring of flows, or resource allocation to identify and evaluate improvement strategies.