Should be fine although best to degrease first and then feather the edges of the spots with sandpaper or emery cloth before painting, and maybe try a spot on a discreet area first to make sure its compatible with the existing paint. I took the block and head on meldrums engine back to bare metal last year and repainted with hammerite, still looks like new. Hammerite is capable of standing higher temperatures than your engine can run at.
I repainted my very old Volvo MD2B after a rebuild some years ago using Hammerite plain gloss. It looked a million dollars when I put it back in. OK, over the years bits were chipped off & rust & salt got under it at the chips because I didn't keep on top of it, but the paint was still OK when I slung the engine after it started seizing every winter. So in my book, the paint lasted better than the engine!
That is what I used. Also resprayed various areas to make it look loved again, the perfect colour match I found was 5 wheel paint for cars (I had it in the shed!).
The silver hammerite is a slightly darker silver than yanmar's, easily fixed with a top spray from the above mentioned spray-paint, I have the tin as I emptied it on mine and want to replace, I will confirm the manufacturer later when I check it.
I repainted mine this year. It is mainly the block that rusts and other bits that are steel. The timeing case and the gearbox are alloy so dont rust. As previously stated lots of engine cleaner and a rub down.
Unfortunately the colour is no longer made. I had the remains of an old tin which was the correct match. You might find a tin at the back of a display in an old paint shop. The number on the tin is 6721803 and the bar code is 5011867218038. The colour is 'Grey'
Found it, if you find some for sale before me will you tell me where you got it please as this has been a good reminder that I am after some more...
And the motor, I did not spray the alternator and the photo is deceptive as how close the colour match really is, as said, I painted bare metal with the Hammerite and over-sprayed which made many flaked of patches invisible excepting a close investigation. It is only an engine after all.
I used 5 or 6 coats of heat resistant aluminium paint (brushed on) to build up thinkness, then breezed over with a very expensive aerosol of Yanmar paint .... Worth it IMHO for the OE finish