Taxi operators are replacing their gas-powered vehicles with electric models to prepare for the government’s shift toward decarbonization and possible tighter environmental regulations.