This is a bad idea. Just get a visa. I did that and had no issue with getting the visa nor entering. Do not try to break immigration law — you can easily get permanently banned from entry if you lie to immigration officials.
Of course, don't lie if you are asked but there's nothing illegal about getting a new passport. Better not have a stamp of a country that is in very bad relations status with the country you are going to visit. Iran is not the only example here.
Getting the new passport is not the issue. You have to answer the question "Have you been to Iran?" when applying for the visa waiver program, and this application is what you shouldn't lie on.