Mate, i am not here to recount history with you. All of the information is available at your fingertips. Read more about your country's war. Preferably non-Baathist sources.
There was no ''Iraqi plan to bring the war to Iraqi territory''. That sounds ridiculous as the suggestion itself is. After the Iraqi army got defeated inside Iran they got pushed back all the way to Southern Iraq. Iranian forces were on the outskirts of Basra from 1982 up to the later stages of war. Iranian army literally laid a siege on the city of Basra in 1987 which forced Saddam to use Chemical weapons provided by Europe and the US. Source :
http://iraniraqwar.com/about.html
Had Iraq not used chemical weapons Iranian troops would have advanced and took over Um Qasr,Basra and other southern Iraqi cities and advance towards Baghdad.
Iran was not only pushing the Iraqis on the Southern sector but North of Iraq was also taken over by Iran-friendly armed groups. Saddam had no control over Northern Iraq as Iranian-backed groups there were running amok, Southern Iraq was heavily contested. Iraq had just 3,4 large cities left remaining out of enemy's harms. Even these cities were scene of frequent bombing. Saddam was just ''ruling'' Iraq by a hanging thread through a few large cities.
Only when Iraq used chemical weapons they could do some pushback against the Iranian-backed groups in the North. Even then it was not a firm control. Iran was still funding, arming and sending weapons to keep northern Iraq out of Saddam's hands.
At the Southern sector Iraq could not handle the huge number of Iranian troops.. it's only solution was again the WMD weapons which was quite effective as Iran did not expect Iraq to use such weapons and was totally unprepared.
All the later stage ''successes'' of the Iraqi army
to free its own territory such as Al Faw were only made possible by the use of WMD's. The war could have gone on for another 10 years, it would have had no effect on Iran as the country was busy with another mass mobilization for the year 1989-1990 and preparing for a long WMD war.
Overall, Iraq was hoping for a swift victory, telling the world it would reach Tehran in 3,4 days. Thinking that a post-revolutionary Iran was too fragile and unorganized. What happened after came as a shock to Saddam and entire Western and Arab world. Not only did the Iraqis get expelled from Iran but due to huge mass mobilization and mass attacks the Iraqis got pushed back and Iranian troops fought the Iraqi army until the end of the war on Iraqi territory.
But, again our discussion initially was the deterrence achieved by Iran after the war. Between 1988 and 2002 Saddam did not dare to respond to any Iranian attack again. In the year 2002 Iraq still had a somewhat formidable army of 400.000 troops.
Saddam even tried to befriend Iran and asked Iran's assistance to help save his air force
Source :
http://www.aerospaceweb.org/question/history/q0071.shtml
So the conclusion is that by 1988 Iran had achieved deterrence.