With Dodges, weird electrical issues are usually a bad ground. Check every wire leading from the negative terminal to the engine block, to the firewall, and any other spot, remove them file wire brush them shiny and retighten. Dont just look and declare them fine, unbolt them and make them shiny and retighten. There is NO point whatsoever in doing anything else until this is done. if it is not the culprit, it would have been at some point.
Also, you said you cleaned the battery terminals. This is a red flag. while one can make green and white battery terminals post clamps appear nearly as good as new, they can still refuse to pass current, whenever they feel like it. That green and white crap has wicked its way up the stranding where you cant clean it and puts the Kaibosh on passing current. Bad battery terminals have been responsible for many issues on many makes and models, but dodges seem really susceptible to them. New battery cables is a wise investment. Most autppartts stores sell overpriced absolute cramp in this regard. Stamped Steel ring terminals with a hole drilled through them. I recommend this place for custom cables from top quality components made with professional crimping tools.
http://www.genuinedealz.com/custom-cablesAfter that, if the condition persists, I think the connector(s) at the engine computer is the most likely culprit. Next time it stalls or fails to start, leave ignition on, and go wiggle the wire bundles at the engine computer lightly and see if any relays click on and off in response to the wiggling.
If wiggling the wires has an effect, it is both good news and bad, good that you know the source, bad that it likely requires a new computer, or at least taking the computer apart removing the potting, and resoldering the pins at the circuit board, and also cleaning the connectors of old dirty crusty dielectric grease, and then cleaning the contacts with Caig Deoxit d5 or d100 .
Some Zip ties holding the wire bundles in such a way can allow one to keep going for many years, but the issue will rear its ugly head again at the worst possible time.
Even if wiggling the wire bundles has NO effect on the stalling no start, it is a good idea to make sure the wire bundles are not exerting their weight on the computer connectors, and of course a clean connection is better than an old dirty one. The Caig Deoxit is expensive, but has no equal and nothing even remotely close. Do not use it to flush the old crusty dielectric grease from the connectors, use the regular connector spray cleaners, but then use the Caig d5 once it is clean.
The Caig Deoxit is magic electrical juice, cleaning every sensor connector with regular spray then Caig Deoxit, then more dielectric grease had my van drive like I removed 500 lbs from it.