The first part is sort of correct, in that all motors have a particular speed at which they're most efficient. That applies to crank-motors as well as hub-motors, except that a CD can hit that optimum speed once in each gear. The second part is not right. Hub-motors are relatively efficient over a broad band of speed, and they also have a relatively broad power band, which makes them a good solution for E-bikes. Whatever applies to hub-motors and bike speed, applies equally to crank motors and pedal speed. The chance of you knowing what speed to pedal to get optimum power of efficiency is pretty slim. Even if you did know what it was, you'd still struggle to hold the pedals at the right speed. I tried it with a Nuvinci to try and understand why crank motors weren't more efficient than a hub motor with the same battery, controller, speed and rider weight, but I couldn't improve the efficiency. maybe it gained a couple of percentage points that were lost by the Nuvinci - who knows.
The point I was making is that if you want hill-climbing, a 201 rpm motor will give you good power and torque up to 15 mph. There's no point in having a 300 rpm motor and restricting it to 15 mph. On the other hand, if you want to go 20 mph, you'd be better using a 270 rpm motor, but your hill-climbing would be compromised a bit. Many OEM hub-motored bikes are designed for 20 mph or more, then restricted for the European market, which means that many are not ideal, though still adequate for most people.
Whatever theory says, is irrelevant anyway. I've done something like 15,000 miles on E-bikes, which includes probably 8,000 miles commuting 30 miles to work. I'm probably one of the few people that has done actual tests on efficiency, climbing power, etc, including side-by-side tests. I used to have watt-meters on all my bikes, so that I could record and analyse every type of journey. I've ridden just about every type of electric bike. I go to all the shows and try everything new as well as experiment with every type of motor. My recommendations and opinions are based on that experience, not by reading what's written on the internet or presented by some jumped up theorist. Being a graduate Mechanical Engineer and an electronics teacher for 10 years, I also have a reasonable understanding of the theory, so I can explain why things are as they are.
After all that, I prefer hub-motors for general riding around, shopping, commuting, etc. Keep your crank motors for full-suspension off-road bikes, where they're a perfect solution; off-road riding where you have 30% climbs or more; and racing (250w only).