BERLIN—One of the world’s biggest car-parts makers is preparing for a future without the internal combustion engine—the machine that has been at the heart of the auto industry for well over a century.

In a major strategy shift, Continental AG said Wednesday that it would cut investment in conventional engine parts because of a faster-than-expected fall in demand as major auto makers accelerate their shift to electric vehicles.

The...