DP World is grappling with the challenge of automation in western Canadian ports, encountering significant resistance from unions regarding potential job losses.