Any heads from a CAST IRON m116 or m117 will bolt on but there are differences:
m116 and m117 heads up to 75 had mechanical ball studs, and matching cams (a more gradual lobe). The heads for m116 and m117 engines 76 and up had hydraulic ball studs, so if you switch you'll need hydraulic cams. Hydraulic cams from a m117 also have stricter emissions profiling so you will lose a crapload of power.
I put on heads from a 3.5 (from a w111 coupe) with matching cams, my compression went way up - so if you'd like more power, this is a great starting point.
FYI, no heads from an aluminum block engine will work. The bolt angle/pattern is different. That rules out heads from a 380, 420, 500 and 560. I was going to try 420 heads on my 4.5 for the newer-style combustion chamber, bigger valves and better flow but found out that they wouldn't fit so I junked the idea.
MB suggests to NOT plane the head unless it's very far out, saying that the torque of putting the aluminum head back onto the C.I. block, following the proper torque procedure, is more than enough to fix minor warping. I agree with this assertion.
Mercedes 3.5 and 4.5 (m116 and m117) head removal and installation pdf