§ 4. Work for a factory. Work shall be deemed to be done for a factory whenever it is done at any place upon the work of a factory or upon any of the materials entering into the product of the factory, whether under contract or arrangement with any person in charge of or connected with such factory directly or indirectly through one or more contractors or other third persons.