Thank you for your question. This is an incredibly grey area. In this case, the divorce and subsequent re-marriage would be with the intent to obtain benefits you would otherwise not be eligible for. If social security caught on to this, they could come back years later and ask you to pay all the benefits back that you got off your ex husband and then you would be stuck defending your actions.
It's not explicitly stated in black and white that you cannot do this, but it is incredibly unethical and no attorney, accountant, or professional advisor who abides by their code of ethics would advise you affirmatively to do this.
I know this is a disappointment to you, and my goal is to cost you less money and headaches in the long run. If you do go this route, and divorce and remarry, be prepared one day to defend your action. It will be hard to find an attorney to take on the case as well, because most social security attorneys who take on cases are taking on disability determinations. If you wanted to divorce and live together, that may be a simpler route -- but there are certain other types of legal protections for spouses in areas such as estate law and property rights. So, be sure to make the decision looking at all angles.
Please let me know if you need anything additional. If not, please rate positive.