On the complex non-linear interaction between bacteria and redox dynamics in sediments and its effects on water quality