A forum member dropped an AMG 3.6l M104 into his 300TE. It was not a straightforward swap although I don't think there was any hacking or welding involved. I believe few if any M104s used KE-Jetronic so you could be in for a heck of a conversion to HFM or whatever the common M104 fuel management system is called.
Hopefully someone will chime in with details on the 3.0l DOHC engine from the 300CE. I think that's the only 3.0l DOHC. Or maybe the same engine was in the early R129 300SL.
As Mike M. says, it's cheaper to buy a running E320.