Let's see how far the trend of motorcycle-disguised-as-bicycle is at
There used to be a motorcycle-disguised-as-bicycle. It was called the moped. It had a MOtor and PEDals. However, the motor was an internal combustion engine that worked well at high speeds when making lots of power and was very inefficient at low power, whereas cyclists produce low power at low speeds. It didn't combine the best properties of motorcycles and bicycles, instead it combined their worst properties. Soon the pedals were ditched but the motor stayed, and today moped means a motorcycle limited to low speeds.
However, electric bikes are different. Electric motors can be made to operate at low powers, so low that they are generally only assisting the rider and not being the primary propulsion method. Actually at lower power levels, the energy efficiency is better. The speed mismatch of electric motors and pedaling cyclist was solved by making the motor mid-drive, where a high-speed motor is turning the cranks at low speed by a single-speed gearbox internal to the mid-drive unit.
The 25 km/h limit (if going over that speed, assist power becomes zero), combines very well the best properties of cyclist and battery. If going on flatland, good bikes with low rolling resistance tires generally attain speed above that so on flatland riding, no energy from battery is consumed. On the other hand, if speed drops even slightly below 25 km/h such as on an uphill, the motor assists fiercely at nearly 500 watts1. I can have very high speeds uphill, far higher than athletic road cyclists attain, while at the same time allowing a 500 watt-hour battery to last 150 km. At an average speed of 20 km/h, that's only 67 watts of average assist, but has the uphill performance of nearly 500 watts. A moped where the motor assist only uphill would be ridiculous, as the internal combustion engine would be wasting lots of fuel when not going uphill. I can assure you that not a single internal combustion engine can have 67 watts of average energy usage, as that would be only 7 milliliters of gasoline per hour. Even a small unloaded engine would idle with 250 milliliters of fuel used per hour.
I believe all types of electric motors have an optimal operating point (torque-speed) BUT are "rather efficient" is a large region around it. Could we do away with the massive gearbox and old-timer RD?
No. If the primary propulsion method is motor, pedals are ditched and the motor is sized such that it can produce lots of power even at low speeds (when traveling up a steep hill) but also produce the same power at high speeds (when driving on flatland), then we could have no gearing, like we do with electric cars. Then we would end up with electric bikes where we ended up with mopeds, i.e. they would be motorcycles. However, you have to remember that current electric bikes are electric bikes, not motorcycles-disguised-as-bicycles. The primary propulsion is still pedals, and to make that primary propulsion work well, gearing is needed.
It's true that electric bikes go faster up hills, so less of gearing is needed. But there is still need for gearing. I generally use about half the gearing range on an e-bike than the one I would use on a normal bike.
And battery capacities are only going to improve.
False. Weight is the limiter. There is only very slight possibility for optimizing capacity per weight. Lithium ion batteries are already very close to their theoretical limits.
(1): If somebody notices that electric bikes are only allowed to assist with 250 watts, that's not the max power, that's the average power over a long interval. As I showed with the battery life, in my usage the average power is 67 watts, far below 250 watts.