But the electric components are not standardized. You can buy e-systems from Bosch, Yamaha, Shimano, Fazua, Mahle, Stromer, Bafang et cetera and they all have different dimensions, different mounting holes, different communication protocols and different chargers.
If you need a replacement part as a consumer, you have no choice but to buy the same part, which is usually quite costly because of lack of competition.