Lots of gays marry for the sake of being married and have not people snooping in their life. Many marry women with whom they get on well and even have children. Usually the wives know let them have a double life.
I'm not convinced he planned what happened. He certainly planned something that became very wrong.
Anni didn't look the sort of woman that would agree to live a double life with a gay husband, but we don't know if he was gay....
And I agree with you that he didn't plan what happened, or better how it ended. But I'm inclined to believe that he felt pressured enough to get rid of her, especially when it was referred that immediately after the marriage Anni was already considering divorce. She would have left him in a matter of weeks....
There was definitely a plan with those criminals that were arrested, but I think they didn't live up to the arrangement and made a mess that led to their arrest and to his exposition.
The Panorama documentary, as usual, in order to bash South African judicial system, tried to diminish the eventual involvement of the victim's husband in her murder.
I don't know how the British and South African legal systems work towards nonimputability by cause of mental illness, but post traumatic stress and psychotic episodes can only count if they happen during a murder event. However extreme depression or anxiety, if incapacitating (which would have to be certified by psychiatric experts) can be used to avoid the presence of the individual at the trial sessions, but in that case he would be represented by a lawyer.