no I would prefer the ocean for sure if it wasn't from a polluted area then your chances are 50 50 I'd guess. I worked with bacteria extensively in a meat safety lab for a while, got comfortable with them and did extra environmental testing around my house and other places just because I knew my time at the lab would be limited and the knowledge would be helpful. I remember testing a toilet which basically represents the cleaning buckets...i tested everything from slices of pizza to the wal mart bathroom door handle to my own cabinets and freezer, and I am sure there are differences between the bucket and the ocean or any other closed container that fosters specific bacteria that can make you sick. then again, with basic sanitization practices dones regularly I'd for sure take the bucket over the ocean! depends on care.
the ocean has temperature consistency, relative dilution and competition in its favor. the dive buckets if not regularly cleaned develop biofilms that retain bad bacteria that bloom when the bucket gets hot in the sun or goes anaerobic in places for whatever reason. since the major population source of bucket germs would be human in nature, your risk for oral bateria and enteric bacteria are specific to humans whereas in the ocean bacteria are adapted for other means largely and in the places we dive tend to be oxygenized well which restricts a decent portion of common disease causing pathogens. depends on care, that's the real science. there are food safety surfactant cleaners and water additives that would be safe to soak masks in, such as quat-4 possibly or others meant for food contact surface. this is easily remedied if basic steps would be taken. one could also rig up aquarium pumps to circulate cleaner tanks through UV sterilizers, that's what i would do. there are even submersible UV sterilizers meant for 90+ gallon reef tanks, these would scrub your cleaner tanks well used in tandem with food safety chems