They normally fail because the cable reel gets poor contact, the actual cord itself breaks internally, or the motor brushes wear out. Multimeter to see continuity on both cores of the cable to the switch, continuity through the switch, and if the resistance across the motor is needed. Cable will be under 2 ohms generally, the same for the switch, and for the motor generally anything under 30ohms means it is fine. But most common is brushes sticking, which means no operation, and you either get new brushes, around 3 pounds, or a new motor, or a new vacuum cleaner.
Very rare for the speed controller to wear, but it is possible the speed control is intermittent, and does not contact at some point on the track. If so then you will need ot fix speed control, though most of the time you run at full power anyway.