I've dealt with this exact problem. Rubber bands trap moisture like crazy, and once sweat and bacteria get going under there, they're hard to shift. The smell comes back because you're just cleaning the surface while the rubber itself has already absorbed the funk. First thing I'd do is clean it properly - soak the band in warm soapy water for a bit, then scrub it with an old toothbrush to get into the crevices. After that, let it dry completely in the sun if you can, since UV actually helps kill the bacteria causing the smell. The key is doing this every week or so before it gets too bad, not waiting until it's rank.
As for preventing it going forward, taking the watch off for a few hours most days definitely helps - just gives the band a chance to dry out fully. If you're someone who sweats a lot or wear it while exercising, you really can't avoid the problem with rubber. Leather bands look nicer but also absorb sweat. Metal mesh or fabric straps dry way faster and don't hold odor nearly as bad. If your smartwatch uses interchangeable bands, grabbing a fabric or nylon one for days when you know you'll be sweaty or active would solve most of your headache. You could even rotate between two bands and let one fully air out while wearing the other.