Paying enemy nations billions of dollars to kidnap and release people seems like a horrible idea no matter what way you spin it.
You know what the US government tells people intending to go to Iran? Do not travel to Iran due to the risk of kidnapping and the arbitrary arrest and detention of U.S. citizens. Exercise increased caution due to wrongful detentions. If you ignore that and do it anyway I don't want a single cent of tax money spent on trying to get you back.
Nizar Zakka is an IT expert, advocate of internet freedom and permanent US resident who was detained in Iran on dubious charges. His story is a matter of concern in tech as it pertains to the safety and rights of tech people working worldwide (like me)