Automakers have been scrambling to partner with tech firms to head off competition from self-driving cars and car sharing services that threaten to eventually trim demand for car ownership.