It sounds like something borderline cruel to do to hamsters, and I would definitely agree that it causes a lot of stress and that it spreads the belief that hamsters are toys that you can essentially 'do what you want with'. It creates an unhealthy environment for the hamsters to be in for even a short amount of time, and I really don't see why on earth you'd want to do something like that to those poor animals. In terms of dog racing, I know that there are a lot of people out there fighting for it to be stopped and banned, because it is considered to be extremely cruel to the dogs, which it definitely is. I won't go into detail, but dog racing is certainly just as bad as hamster racing, if, honestly, not worse for the dogs, in my opinion, at least. Agility, HTM, Flyball, Working trials etc. are all great ways to bond with your dog, and work with them, but none of them are actually dog racing, and the two things can never be compared in any form, to be honest.
I think the best way to stop it is probably to spread the word about how bad it is, and to persuade friends and family to boycott the races, as well as doing so yourself, and ask them to pass the message on. Maybe if enough people refuse to show up, they'll have no choice but to stop, since there won't be an audience there for them anymore, and people will realise what something like that really does to their hamster, in terms of stressing them out, etc. not to mention all of the potential dangers, such as the hamster being dropped and badly injured, for example.