The actual evolution process was wood-powered steam trains, then coal-powered steam, then electric, then diesel-electric.
Yes, in the US, several railroads electrified then deelectrified, because it turns out that (for freight at least) diesel-electrics get you most of the useful benefits of electric locomotives without all of the problems of having to string up electric catenary and worry about provisioning traction power stations for your 1000s of miles of mainline track.