I'm not 100% sure if factorio was the first, but the devs at Wube certainly perfected the idea and now there's a whole market for the "factory game" genre.
Even if it's not the first, I'd say it's the first that figured out that computers were powerful enough that you can have a gobsmackingly huge factory.