Apple has huge expertise in both these areas. Not electric motors sure, but electronics design and manufacturing in general and specifically battery technology on the power train side and software on the self-driving side.
But the key to their potential is software. I think the main reason for Apple's success is their super high quality OS core, code libraries and software development tool chain combined with one of the greatest software engineering culture and talent pools on the planet. They have exploited this advantage ruthlessly ever since the 90s. It underlies the success of all their best products - even the iPod if you bear in mind that iTunes was built on these core advantages. Yes iTunes is a mess now, but it made the success of the iPod possible.
The key to success in the coming car revolution will be software. Computers will control and orchestrate every aspect of the internal operation of the vehicle, and that's before you even get to external operations with self-driving. Only Microsoft has the depth of software development competence and the technology platform resources to compete with Apple in this area, but for whatever reason they just don't seem to be able to get their act together when it comes to engineering complete product stacks rather than individual technologies.