I firmly believe that the overwhelming majority of Americans, including MADA voters, do not want the USA to start a war with Iran. If Trump does, and there are more than a few dozen American servicemen casualties, the Republicans will lose the US House of representatives this Fall, Trump will lose all possibility of carrying out his agenda for the remaining two years.
Given that, and that Iran has so completely botched its "nuclear bomb" deterrence, why not give up its nuclear ambition completely, in a huge public relations way. Go to the UN, declare no enrichment for 10 years, allow nuclear inspectors. Make it so that Trump "wins" this. Also go on a PR campaign within the USA talking to USA media and politicians 24/7 for a while. Drag out the implementation talks to the point that Trump cannot sustain the military build-up any longer. Give in on an inspection as a stop gap.
Iran would declare that missile program and middle east militia support discussions would be follow complete resolution of the nuclear program agreements and would be totally contingent on total sanctions relief and/or investments in Iran by others.
It seems to me that this could disarm Trump's imminent military threat and sway USA public opinion that the only real USA interest, diffusing a rogue nuclear state, had been achieved.
This would allow Iran to work on internal reforms that strengthened internal "legitimacy" as well as continued hardening of its missile program's deterrence against Israeli attack.