I'm not surprised that your wife didn't like having the other end of a double dong inside her. Use a proper harness and dildo instead.
When your anal muscles take over all by themselves it's a sign that you have started on the learning curve.
Learning to do anal (especially to anal orgasm) is quite a lengthy process. You seem to have made a good start. What you now have to is to try and keep the dildo in while your bum tries to push it out.
Make sure you are not using a jelly or a dildo coated with a colouring (as these can provoke exactly the sort of reaction you described)
One way to keep the dildo in is to have the other end pushing against an immovable object. The reaction you describe will in fact leave your bum hole more relaxed. Did you feel it with your fingers afterwards? What you need to do is to keep practising with your dildo until you can start to enjoy the sensation of having it inside.
After that you need to work up in size. A true anal orgasm comes mostly after stimulation quite deep inside the rectum with a large object. I would say 2.5 inches thick is the sort of thickness you should first aim at. The length will be well over 12 inches.
I had been playing with my bumhole for many years before I had my first anal orgasm. Now I know how to recognize the early warning signs and how to get there but getting the first one is a long term project,
Without going into great detail, you need to be utterly relaxed, utterly accepting of having something deep inside you, and really really enjoying the feeling. So into the enjoyment of it in fact, that you open yourself entirely to the pleasurable sensations. At that moment, when you have forgotten about the outside world and anything else except how much you like being f*cked there is a space for you to experience the wonderful and overwhelming sensation of an "anal" orgasm.
Finally IMHO an anal orgasm has very little to with the prostate, but with the stimulation of the nerve endings at the top of the rectum and the muscles of the pubo-rectal sling.