What he said, except I haven't use the thinner deal. I just wash it with Dawn and as hot water as I can get, hose it off, blow it dry with air then blast it everywhere with WD-40 and blow that around. You do not want to wait to WD-40, etc the block. As soon as the water is 99% off, start hosing with the WD-40 can and use air to move it around. After all, "WD" stands for Water Displacement". Paint after machined surfaces protection is in place.
Same on the cylinders except backwards LOL - I wipe with thinner or brake clean, then several wipes with WD-40, then finish with ATF until the rags don't pick up any material. Same on all machined surfaces. (PS - I use ATF to clean on my machines too - lathe bedways, mill table, drill press column, etc)
As for painting, I wipe down the surfaces to paint using wax and grease remover - gallon can from the pro auto paint store, same thing used to wipe down metal during paint prep. Mostly fancy lacquer thinner. I mask off what I can which sometimes require a machine surface to be wiped with brake clean to get tape to stick. The rest I use cardboard to block over spray. I have a real peeve about seeing over spray on main caps, springs and such. Chalk it up to OCD. I prefer Duplicolor Old Ford Blue. Sticks good if the metal is clean and dry. Then remove all masking and wipe all machine surfaces with ATF. Then bag until assembly time. SBFs fit in a regular Hefty bag, the larger stuff fits in 55 gallon drum liners from Sams. Or if you have a big shredder at work, "borrow" one of those bags.
At assembly time, any surface getting a gasket then gets the wipe with oil/grease remover, air dry and gasket. Decks get another cleaning with ATF, several wipes with the thinner, compressed air dry, then gasket - handle by edges only. No finger prints on the block or head deck, or gasket surface. Use studs, guide pins, whatever so the parts go right together.