My first guess also would be the AMM (air mass meter). It also could be any form of air leak. These motors adapt so well that even a car with AMM detached runs pretty well. I know this from finding such a hesitation in an E430 while changing the AMM. I just knew it had to be a AMM and when I went to replace it the rubber flexpipe was noted to be separated from the hard plastic breather tube. In essence the AMM could have been in the trunk.
The car actually drove pretty well except on sudden accel or extended hard accel. A new pipe fixed it.
The only real diagnostic help here are adaptation values.
Bosch Master, ASE Master, L1
33 years MB technician