That unfortunately is a very dangerous and very bad advice in this case. The ESTA doesn't just check your passport for evidence of you being traveled to these countries. They ask you if you did. If you tell the truth, you don't get a visa waiver. If you lie and they learn about it from some source you can be in a heap of trouble. This trouble can include deportation, inability to ever again enter the USA, complications with entering many other western nations, etc.
I don't know about the probabilities of them figuring out the lie. It can be anywhere between "being hit by lightning" and "almost certainty". The potential consequences on the other hand are known and quite dire.
Different if you are from another country, read poorer and not part of the Western world.
Notice it says in the article:
> Entry: If there is evidence of travel to Israel in your passport entry is unlikely to be granted.
Israel will, upon request, give you a removable sticker for your passport instead of stamping it if you also need to travel to unfriendly countries. I'm sure Iraq will figure out the same thing. (despite the irony!)