Your scenario is very plausible.
Obama Sr. told both INS officials and the University of Hawaii administrators that he had married Stanley Ann.
So I am prepared to believe that he went through with the ceremony (but probably very much regretted it when he found out that Stanley Ann had also been having sex with Davis and that maybe he wasn’t the father after all).
But I don’t completely exclude anything at this point.
An explanation that fits much better is that Ann was having Sex with Frank Davis, and AFTER she got pregnant, they approached Barack Obama and offered him some money to pretend he was the father so as to prevent Stanley Armour Dunham from discovering that his best friend was diddling his daughter.
In everything i've ever read, Barack never acted like he gave a rat's @ss about Stanley Ann. He often forgot he was even married to her, at least until it suited his purpose to be married to her. Something like 10 naked pictures of Stanley Ann have surfaced, and they appear to have been taken in 1960, right about the time she became pregnant. Frank Davis has been conclusively identified as the photographer. This is really not that hard to understand. Barack was the stand in patsy to keep Davis out of trouble with both his wife AND Stanley Dunham.