In theory giving Sonic to Mario would work but Sonic in his prime was the alternative to Mario. The fast-paced platforming of the Genesis games was a different take on the Mario formula and Nintendo might not understand its appeal. Sonic was effectively rebelling against Mario. Nintendo would probably make a good game but maybe not a good Sonic game if you get my meaning.
There were a lot of Sonic rip-offs in the 16 bit years and most were not very good but Rocket Knight Adventures was decent. That was Konami. Don't know what the people involved would be working on but maybe they could try. Treasure might be able to do Sonic well. Whatever team at Namco did Klonoa might be capable. If we want to try to get Nintendo involved maybe GameFreak is the one to do it since they did Pulseman.
Good Feel showed they could pull it off.
The speed sections in Wario Land Shake are better then anything Sega's made with Sonic in the last 20 years.