Running a lean mixture by itself isn't necessarily going to cause detonation, pinging or knocking. WW2 era old timer piston aircraft pilots used to run seriously lean mixtures on long hauls to increase range and it was safe to do so when they were at cruising altitude and power settings. You'd never consider doing it in a climb or at a high power though.
With an automotive engine, you'd have to have adaptive programming that would adjust the mixture from rich to lean depending on what level of load the engine was under. On a long haul, level roadway at steady highway speeds, you could probably run lean a good amount of the time, but for your typical city style stop and go, or hilly terrain, you'd probably never be in a power range where it would be safe, efficient or effective.
As for emissions, running lean definitely does create Nitrogen Oxides, so that may be of added concern in smog prone areas.