Praise be to Allah, the Lord of the Worlds.
1. Paying money to the water purification station isn`t a sale contract in the Islamic sense, because an impure substance can`t be sold. Rather, it is money paid in return for abandoning something, and there is no harm in this. The jurisprudents called it "Request for deferral."
2. Carrying these impure substances to the factory, and the cement manufacturing unit… are permissible. However, one who carries them should wash his body or clothes from any impurity, and he isn`t permitted to pray without doing that. Until recently, people used to use animal manure as fuel for traditional bread ovens.
3. There is no harm in mixing the residue of these substances with cement although the residue of an impure substance is equally impure. However, it is permissible to use it in constructional materials, but in places other than mosques. Also, cement bags mixed with such residue should be tagged as such so that people avoid using them for constructing mosques and the like where purity is a condition. And Allah The Almighty Knows Best.