I can't imagine the ICE ever going completely away, simply because there are certain uses of it, especially in 1st world developed countries, where electric probably won't ever be able to substitute for it.
It basically comes down to energy density. Right now, fossil fuels are the most energy dense for their weight. They are portable enough, along with the engine, to make for machines which are very powerful, yet still small enough for practical purposes.
For instance, you'll likely not ever see - barring some extremely major advance in battery technology - something like a Bobcat Skid-steer loader using an all-electric drive system. The problem isn't the motors - it's the battery; you can't make one small enough with the same energy density as the diesel or gasoline those machines currently use.
That's merely one example, I can think of more, but I won't. The only way around any of this would be to change (fairly radically) how certain tasks are accomplished; For instance, if instead of such a machine with a single operator, you instead had a ton of smaller robotic machines digging or whatnot, all in some kind of conga line or bucket-brigade type system - and let it work overnight or be slower in some other manner - the same amount of work could potentially be done and stay all-electric. But - somebody will be losing a job in such a scenario...