Each track has a "stop wagering device"
In a good system this device would be tested, and monitered by a professional

(seriously) it should be someone's responsibility. Ideally the tracks would be fined when the device malfunctions on/before a live race.