Hard to keep it clean if you do it first. In your case I would do all the bodywork, then when it's truly ready to paint, I'd drop the engine out the bottom, prep and paint under the hood, reinstall the engine from the bottom and paint the exterior.

Sheldon