I think your dealer is full of crap. $5000 for a V8 valve job is insane. And I am skeptical of their diagnosis. If the valve guides were worn enough to oil and foul the plugs, you would definitely see blue smoke out the exhaust when coasting down from highway speed. A fuel injection problem could easily cause your rough idle, as could lots of other minor problems. If you like the car, and it is in good condition, I'd take it to a good independent shop that is experienced with MBs (this is imperative) and have them inspect it and offer an opinion/estimate. If it really needs a valve job, have them do the timing chains at the same time. I would avoid the dealer at all costs, as they are generally not interested in working on older cars and will miss no opportunity to gouge you.