The MILW's Pacific Extension had financial problems from the beginning, as it was opened only a few years before the Panama Canal. Also, while it would have been a great route for today's intermodal, coal, and oil trains, it had a serious lack of online business. Most of the route was either sparsely populated or already served by the NP. Some evidence of that is that very few of the MILW's lines were picked up by the BN. It really was redundant.
Arguably, the electrification extended its useful life, as it drastically cut operating costs, compared with steam. The MILW's steam locos weren't well suited to mountain operations, especially in the winter, while the motors actually ran better in cold weather. Diesels could compete, but probably didn't have that big an advantage at first, simply because the motors were paid for and required little maintenance.
What really killed it was age and management hostility. The bosses back in Milwaukee liked diesels, considered electrics "old-fashioned", and felt that any money spent should go to the diesels. The electrification was worn out, and rather than replace the wires and buy new motors, they basically ran it until it fell apart, similar to many roads' attitudes towards steam in 1950s.
The original shutdown date was in 1973, but the oil embargo that year made diesel expensive, and in some areas, scarce, so the motors ran another year. By then the only reliable motors left were the Little Joes, as the boxcabs were suffering from metal fatigue in the frames, and in some cases literally falling apart. The entire system would have had to be replaced, and the railroad was broke. The Pacific Extension only lasted a few years without the electrics.