This transaction is not permissible as it falls under the prohibited category of
concluding two sales in one transaction. The reason is that you stipulate that in return for selling them the shares of your factory they have to buy you other materials as a price.
May Allah grant us success. May peace and blessings be upon our Prophet Muhammad, his family, and Companions.