At threshold power, I'm guessing more like 22-23mph.
And, not to toot my own horn, but that's a pretty damn fit experienced cyclist.
My point here is that it's not the bike that makes you go 40mph - it's the "engine" (the human) and the environment. Expensive human-powered bikes aren't going to magically turn someone who tops out at 20mph into someone doing twice that.
Having to work for high speeds, even if just rolling down a long hill on a “bare” machine, regardless of material or price, will create a much deeper mental involvement of what you got yourself into.
Thus, unassisted cyclists are (my guess and own experience) much more aware of their surroundings, what lies ahead and thus alert.
Things obviously can go wrong either way…
A novice rider will have a very hard time hitting 65km/h without going downhill or a strong back wind, even on a light bike. It's a challenge even for trained cyclists. So you won't see this on a city's streets but rather on open road.
But stopping fast and safe at those speeds is even harder than reaching them because you can't take your time to do it. A bike that can make it easy to reach them shouldn't share a lane with much slower and unpredictable participants, like regular lanes on sidewalks.
But I used to bike from Alameda into SF for nearly a decade. I even biked occasionally from Alameda to Menlo Park...
That being said, while I really want an E-bike, I am also cautious: I have fallen a lot, and I used to get my bikes up to 44 was the fastest I ever went, down the long bike path along Lexington Reserviour which we used to bike up every morning...
Going ~40 on ANY terrain on a mike is dangerous/scary as heck.
I've had bikes just literally vanish from beneath me and I went sailing through the air.
Never would I want to do that on something that weighs more than me....
PLUS - how do you carry Jacques bike up/down stairs to transition between trains/levels/whatever...
That wonderful hack looks heavy as heck, but lovely.
The only difference is the experienced, lycra-clad cyclists with expensive bikes just get up to speed faster, maybe with less of a tailwind or downward grade. However, unlike their speedy novice kin, they (should, in theory) have better bike handling skills.
Overall, I think a strategy of banning with people the highest cycling skills from bike paths seems like a bad idea. Sure, you got weekend warrior dentists with fancy expensive bikes but their mediocre fitness level doesn't allow them to really extract significant benefit from their high-end cycling equipment. Their fancy aerodynamic carbon fiber bikes are probably only getting them a few mph over a classic steel frame. For more serious enthusiasts and professionals, those seconds matter... for everyone else it's just a flex.