China is rapidly replacing diesel trucks with electric models, cutting fuel use and emissions in one of the world’s largest freight markets.