FRANKFURT—German car makers BMW AG, Daimler AG and Volkswagen AG face a looming threat from the automotive ambitions of Google Inc. and Apple Inc. But German car-component makers see rich prospects in the burgeoning connected-car business.

Equipment giants Bosch GmbH, Continental AG and ZF Friedrichshafen AG, which are expanding into mega-suppliers able to leverage new technologies for all parts of a vehicle, have started working closely with the U.S. technology giants.

The...