Failure management in sewage treatment plants