Way Too Many Convenient Occurrences to Make This Work
1. When one goes to a motel with someone you are not supposed to be going with, you don't lie publicly around the pool and leave your room unoccupied.
2. The cuckolded husband can obtain your room key.
3. The policeman does not notice his gun has been switched. One who carries a gun everyday can distinguish it from other similar guns.
4. Your wife's lover is conveniently the investigating officer.
5. The scenario of your arrest goes exactly like you planned it.
6. The bullet you shot your wife with lodges in her head.
7. You are so smart to figure all this out but fail to consider your wife's death would trigger a charge of murder and not be "Double Jeopardy."
This is just a complicated and convoluted plan that it would never work. Reminds me of the great line from "Body Heat." "Anytime you are doing something you are not supposed to be doing, there are any number of 50 things that can go wrong. If you are a genius you can thing of 25 and you aren't a genius."