Out of all of the performance car brands grappling with the zero-emissions transition, none have had the success of BMW M.