Mechanical drive trains also wear out. My XT drive train on my mountain bike is 9 years old. The front shifter is perfect, my brakes are in good nick, the crank works fine, but everything else is really worn, rear derailleur and front shifter in particular. And all consumables need to be replaced soon, too. Damper and fork need would need a service, too. Instead, I will just get a new bike. After 9 years and >20k km I think that’s alright.
Overall, I expect electronic drivetrains to last the lifetime of a bike, which is 8–10 years for road bikes, I reckon, and 6–8 for mountain bikes.
This is a problem with sanctioned races. I live in Shimano land, and the neutral support vehicle only has Shimano wheels. In 2019, I think they nary had a disc wheel, too. I’m not sure if that has changed (since Covid I have only participated in a single, non-sanctioned race, so I don’t know). If you are on SRAM 12-speed, you are screwed.