I commuted to/from a train on an electric scooter. Not only are they just not viable for any trips longer than 3-4 miles, you can't go up any sort of incline either. Mine was "overclocked" to enable up to 500w of power and I'm 180lbs, but it wouldn't be able to climb even a 10 degree incline at over walking speed. And at least the consumer ones you can find on Amazon are not robust enough to withstand even 6 months of daily use before the tire wears out, battery terminals corrode, and screws start falling out.
$2k e-bikes are probably more robust than the $600 scooter I was riding and would definitely be my choice next time around. For anyone interested in e-scootering though, avoid the Segway ES series like hell and make sure you do your research.