How to Transform Your Factories into Smart, Flexible, and Resilient Systems