The negative outputs and inputs are due to the "double negative" waste modeling in ecoinvent: a process must have a product on the output side, therefore also a wastewater treatment plant which has the product (to be treated wastewater) on the input side in real life gets in ecoinvent to be treated wastewater on the output side, and in order to maintain the mass balance, this output flow is negative. Then, the process which is producing wastewater has it on the input side (while in real life, on the output side) so that both can be connected, and it has it also as negative flow to again preserve the mass balance. I admit this is not terribly intuitive, if you model your own process that has wastewater output, you also need to move it to the input side, with a negative sign.