In-process tracking and traceability for zero-defect manufacture of electrical machines