A generalized model for bacterial disinfection: Stochastic approach