Uber Technologies Inc. on Tuesday said every vehicle on its global ride-hailing platform will be electric by 2040, and it vowed to contribute $800 million through 2025 to help drivers switch to battery-powered vehicles, including discounts for vehicles bought or leased from partner automakers.