From Late Latin 'factorium' (a place of doing) — originally a foreign trading post before meaning a manufacturing facility.
A building or group of buildings where goods are manufactured or assembled; historically, a trading post or commercial establishment in a foreign country.
From Medieval/Late Latin 'factōrium' (an establishment for commercial activity, an oil press — a place where olives are 'made' into oil), from Latin 'factor' (maker, doer, one who acts or transacts — the agent noun of 'facere'), from 'facere' (to make, to do, to perform), from Proto-Indo-European *dʰeh₁- (to put, to place, to set, to make). The root *dʰeh₁- is among the most generative in all of Indo-European: 'facere' produced 'fact' (factum — a thing done or accomplished), 'faction' (a making or party), 'fashion' (via Latin 'factio'), 'feasible,' 'affect,' 'effect,' 'infect' (to make bad — to put disease into), 'perfect' (thoroughly made, complete), 'defect' (an unmade part), 'manufacture' (manu + facere — made by the hand), 'office' (opus + facere — work-doing), and 'satisfy' (satis + facere — to make enough). Greek 'tithenai' (to place → 'theme,' 'thesis,' 'hypothesis
Before it meant a manufacturing plant, 'factory' meant a trading post in a foreign country — the Portuguese 'feitorias' along the African and Asian coasts were 'factories' in English. The East India Company's operations in India were run from 'factories' that had nothing to do with manufacturing, just commerce.