The software "factory" analogy doesn't make sense
Software production may be automated eventually, but it won't resemble a factory.
A factory takes an already designed product and replicates it using a standard process at a low cost. If we were to use this analogy literally, the software factories were invented when people learned to save programs to floppy disks for distribution. A real automated software production system would require automating what are, in essence, craftsmen and artisans.
There are multiple decisions at every step of the software development pipeline that require judgment calls. Software development automation would automate human decisions where there is no explicit right or wrong.