It was a nightmare bike, yes. But still I made more than 10k miles with it, and in a shitty weather like the Swedish one, I guess there's still no "nordic-certified" e-bike yet. You need a tank to stand the bad weather here, but still. It's very lame that the bike has always failed on the same point, the back-wheel. I would definitely go for a Bosh or Yamaha or something like of the sort (but I'd of course make my research first).
The only positive thing I have to admit about Specialized is that they extended the warranty up to 4 years (it's by law 2 years), because the issue was the same all the time, so new replacement, another extension, but it was really a problem for me to had to drive my car 60 miles to the dealer for every issue every time.
My final advice: get an e-bike to the closest dealer possible, never purchase on the internet just for pricing to get a few bucks off, go to a store and make sure they can fix any issue with your e-bike (they should have the means, a proper workshop, and be capable of the repairs or dealing with the brand as good as possible).