There are films with this kind of agreement.
Marriage is not something concerning 2 persons only. You may beget children. What will be their fate? If you enter into a contract it should contain provisions for looking after possible children too. No contract can bind unborn future individuals. Children are not property of parents. Parents are only compulsory trustees. You have a responsibility to look after children you bring into this world. Divorce is an unanticipated eventuality.
In the Gujarat there was a practice called 'Maitry Karar". As the name itself implies it is something similar to what you want. There was criticism of the system. I do not know whether it has been banned. If it is not banned both of you can go to Gujarat and enter into a Maitri Karar.
Good luck