So this may just be my Sherlolly-loving heart’s wishful thinking, but I had a think.
I know that, here in the States, spouses cannot be forced to stand witness against each other in a court of law. They can willingly, but not by force.
I know everyone’s freaking out about that ring being a sign of Molstrade, but if there’s a similar law in the UK (and I’ve done no research, so I have no idea), I would not put it past Sherlock to protect both Molly and himself by marrying her. That ring could very well be the key to Sherlock keeping Molly out of jail. Since, you know, filing fake death certificates is illegal.