Hammerite isn't as good as it used to be thecoops. Several years ago it contained a very nasty chemical called xylene which burned your skin (as we all found through experience!). It also kept you awake for two or three nights if you breathed too many of the fumes while painting! However, Hammerite was damn good and it lasted for several years.
Now Hammerite have stopped using xylene the paint just doesn't last. It starts to flake off after a few months and rust starts coming through after a year or so. I've used the new stuff for a number of things and I just haven't been impressed, nor have others in the classic car forums. (lets have the xylene back - we always put up with the burns and sleepless nights!) I don't think engine heat will help Hammerite and it will probably last even less time.
If you want to paint your engine then most motor factors sell high temperature paint designed just for engines, including manifolds. It comes in aerosol or brushable form. I bought some recently and it was less than £6 for an aerosol can.