A hammer isn’t a factory. There is a distinction, unless you don’t think industrialization had any effect on society.
Even today factories aren’t the means of production, they don’t make houses that’s mostly people with hand tools. Nor do they make food or mine resources etc.
Marx was not the origin of Communism or the phrasing around means of production. The context for his writing wasn’t simply factory conditions being so bad he created an original ideology from whole cloth. Which is why he was credited with the Marxism not Communism.