In "Gray Matter - Discourses in Contemporary Halachah", Rabbi Chaim Jachter explores various proposed solutions to the Agunah problem, including the idea of instituting a condition that would retroactively annul the marriage in the event of civil divorce. He writes that such a suggestion was made in the late nineteenth and early twentieth centuries by some French Rabbis, based on a Rama (EH 157:4) who provides a similar procedure to avert potential chalitzah problems.
However, this proposal was rejected by nearly all the halachic authorities at the time. In fact, an entire book, Ein Tenai Benisu'in, was published collecting the letters that hundreds of halachic authorities wrote against the idea, including Rav Yitzchok Elchanan Spektor, Rav Chaim Ozer Grodzinski, Rav Chaim Soloveitchik, Rav Yisroel Meir Kagan, Rav Yechiel Michel Epstein, Rav Meir Simcha of Dvinsk, Rav Malkiel Tannenbaum, Rav Tzvi Pesach Frank and Israeli Chief Rabbis Avraham Yitzchak Kook and Ben Tzion Uzziel.
The opposition was based on several Halachic issues: Firstly such a condition may be considered "masneh al mah shekasuv batorah" (see Kesubos 56a) - if one makes a condition which contravenes a Torah obligation, the condition is void and the transaction is effective. Another problem is that the Gemora (Yevamos 94b, Kiddushin 72b - 74a) seems to imply that a condition can only apply to the first stage of marriage (Kiddushin) but not the second stage (Nissuin).
There were also technical grounds to the rejection. The laws of formulating conditions are complex and many Rabbis do not know them. Furthermore, such a proposal would weaken the entire institution of marriage - if a couple knew that the that its marriage could be retroactively undone at any time by just filling for civil divorce, they may be tempted to cheat on their spouse knowing that they could avert the sin of adultery by retroactively cancelling the marriage. The Rabbis were not prepared to weaken the entire institution of of marriage in order to solve the difficulties a small percentage of people incur.