A modern network would have a far greater route mileage electrified for which electric locos would be needed. Add to that, DB (and its predecessors) non-use of electric traction is unforgivable.
If you ran a commercial operation, would you use electric locomotives if doing so cost more than running diesels, purely because it's better for the environment? Especially if your customers were not prepared to pay more for AC traction so you had to suck up the additional cost yourself? Seems like a pretty straightforward commercial decision to me.
The people you should be railing against are those who allowed the price of electricity to exceed the price of diesel. And that isn't DB's board.
I agree railway freight should be electric as much as possible.
However, the incentives for the (private) FOCs aren't quite right at the moment - railway diesel is too cheap, and UK electricity is too expensive.
When we get periods of time gas isn't part of the electricity mix (scheduled to start happening in 2025), electricity prices should start to fall, as they won't be set by gas prices anymore for at least part of the time.
This is all further complicated by the fact that, all else being equal, having fewer types of locos is usually cheaper than having more types of locos, as you need less staff training/refreshers, etc. Of course, every FOC needs diesel locos, so for FOCs with more locos than they have work for (such as DB/EWS), there is a continuous draw to stop using the electric locos.