Is it acceptable to put the prepositional 'in', in this sentence or it should be dropped?
I've been visiting the factory.
or
I've been visiting IN the factory.
(This answer is from the point of view of British English: I have the impression that visit is used in other ways in American English, though I don't see anything in Wiktionary to confirm this, so I may be wrong.)
Visit means "go to a place to see that place, or go to where a person currently lives or works to meet that person".
So visit the factory makes sense, and is normal. Visit in the factory makes no sense - but I've been visiting my colleagues at the factory is fine.
One usually says "visiting the factory", or "in the factory, visiting." "Visiting in the factory" is rarely used, but not incorrect. On the other hand, "visiting in a factory" is not uncommon and would emphasize that the visiting for today happens to be in a factory, and maybe tomorrow the visiting would be on a farm, for instance.
1: I've been visiting the factory
The thing I visited was the factory itself - probably, but not necessarily, there were people at the factory, and I may have met some or all of them.
2: I've been visiting at the factory
(or ...in the factory - the choice of preposition makes no difference)
Means the factory is the place where I performed the action of visiting. With the strong implication that I visited several different people there.
I find both the above reasonably "idiomatic", because it's easy to imagine #1 being said by a businessman who's thinking about using the factory for some work, and he wants to go and look things over (maybe just the buildings and equipment, at a time when it's unoccupied).
If we change factory to school, I can easily imagine the parent of a child due to start at the school next term going to check it out in advance. And visit is a reasonable verb for that context too.
BUT if we change factory to hospital, I find it really hard to imagine #1 making sense. People don't normally go to a hospital to check it out before using it (and if they did, visit might not be a very good way to describe the process). Besides which, visiting people who are in hospital is a much more common activity than visiting people in a factory or school.