Microgrids and Energy Communities: How Local Energy Systems provide technical & societal resilience