Mid-sized manufacturers are investing heavily in automation, but outdated ERP systems are quietly undermining those gains. Here's how AI changes that.