I'm not sure a diesel generator is much better. In the US, petrol power generation is 2.46 pounds CO2/kwh and coal is 2.31 pounds/kwh. Maybe coal is less efficient in Germany, but I doubt it's significantly worse than petrol.
And there are other negative emissions with oil, like forced methane production (burn, bottle, or release). Though coal has similar issues too (e.g. more radioactive release than nuclear power).
That said, there's a disconnect in our debate. Coal plants are an energy source. Cars and ebikes are an energy load. You can't really say "coal is worse than cars" because you cannot replace coal plant emissions by adding more cars. Similarly, you'll have cars even if you replaced coal with zero-emission renewables.
The argument becomes interesting when you add bikes into the picture. You can replace a large portion of petrol-car kilometers with coal-ebike kilometers and gain far more kilometers traveled per kilo of CO2. This argument can also be extended for emissions related to calories in acoustic bike kilometers.
The "per mile" in "ebikes produce less CO2 per mile" is critically important to the argument.