It’s highly automated but you still need people to watch the machines. Many Lego factory videos are available.
If this lets them source much of the plastic locally, it will save on millions of boxes being shipped across the ocean. That’s a huge reduction in carbon, even if the local manufacturing costs a bit more.