This rising/falling idle is ever so prevalent in 3.5 motors. I am sure it is a programming issue with the set speeds of the decel cut-off function.
The reason for the up/down idle is that the closed throttle decel cut-off is initiated at around 1800rpms. That means that at 1800 rpms with the throttle closed the fuel is cut untill the idle speed drops to 1200 or so, where fuel delivery resumes.
If you wish to see how high it would have idled, pull the throttle switch wire. Without seeing the closed throttle switch the engine will idle where ever the air quantity places it. No more up/down at any speed.
The 3.5s either had a lower threshold of decel cut-off or they are more sensitive to failed aux air valves. The 3.5 also has different timing relation to idle speed with its higher compression.
Bosch Master, ASE Master, L1
33 years MB technician