This isn't 100% but the ECT coolant sensor will alter the idle on the Cummins diesel for warm up I assume the same should be true on the V8 gasser series so if the coolant temp is too cold it will idle high and if the coolant temp is too hot it will idle low. This can be verified with a live data tool like a Scangauge II.
As for other thing I would look at vacuum leaks, IAC in the throttle plate, etc... Because technically the throttle plate are closed completely and the fuel/air ratio is controlled by the MAP sensor and O2 sensor to keep a clean idle by giving air or giving fuel so if there is too much air leaking in (vacuum leak) to keep the mixture correct it will add fuel hence a high idle will occur.
As for the battery disconnect... Just think of the PCM like a thumb drive on your laptop... You write information to the thumb drive then remove it and place it in your pocket (battery disconnected) then some time later (even years later) plug it back in and the information is still there just the way you left it. The PCM follows this exactly. The only way to reboot the PCM is turn the key OFF and wait a few minutes and start the truck again the PCM is force to do a reboot and used store programming in PROM (Programable Read Only Memory) which requires a Dodge DRBIII tool to even alter, change or flash entire PCM.
Now I know older vehicle like my 96 dodge has the ability of dropping the error codes with disconnecting the batteries. But this is not fully true either because you might of wiped out the error codes but a flash code 12 remain alerting a tech that you cheated and pulled the battery to hide error codes. So even that is not a fool proof way of erasing...