The models you cite have different engines. Through '97 the E320 used a
24 valve 3.2L straight six, starting '98 an 18 valve 3.2L V-6 was installed and it continued until '06 when a 3.5L 24 valve V-6 succeeded it. The old 4 speed hydraulic transmission was used thru '96 MY and a 5 speed electronic box replaced it in '97.
As to longevity. The straight six has a cast iron block and an aluminum cylinder head; these dissimilar metals expand and contract at slightly different rates and that seems to tax the head gasket so, around 150K miles it is prone to fail. The straight six is known for oil leaks from its front cover and valve cover. This engine's oil & filter should be changed every 7,500 miles and its spark plugs done at 35K miles (fixed maintenance schedule). I own one of these understandable engines and do the spark plugs myself. I believe its useful life will be 250K miles given scheduled maintenance.
The all aluminum V-6 has had problems with its harmonic balancer. Apparently the balancer fails and its pieces damage the engine to various degrees. The other issue is with (correct) synthetic oil use given its variable (computer determined) service interval. Traditional oil used by some owners (apparently not having instructions to the contrary) didn't stand up to extended service intervals and those engines subsequently burn oil. A liter or more consumption in (only) 700 miles seems to be the threshold for M-B's repair assistance. The only way to really know if an engine was refilled with synthetic oil is to review each service bill - the oil's higher cost should indicate that fact. But to find a used car complete with such receipts won't be easy.
I hope this helps you even though additional data makes things more, not less, complicated.