>I'm assuming here that Iraqi and Moroccan Arabic are not entirely mutually understandable -- is this correct?
Moroccan Arabic is very hard to understand for Iraqi people. In fact, if you're an Arab from the Asian part of the Middle east, you may need subtitles to watch a local Moroccan movie.
>Suppose a Moroccan and an Iraqi are talking. Suppose also that these are educated, literate people who understand MSA. Wouldn't they talk in MSA, or at least something halfway between their local dialects and MSA?
What usually happens between Arabs from close-dialects countries is that they speak their local dialects and use the MSA to express the different, unfamiliar words.
But between very far, quite different dialects (e.g. Moroccan and Iraqi), they often speak MSA, entirely. (Native speaker here)