If I was Johnson I would have played it a bit differently though, yes he wants to be PM and so wants May to go and so yes, getting the deal through helps facilitate that, but do people really think the only way May goes is if she passes her deal? She is Dead PM Walking either way, all he has done is opened himself up to accusations of self interest and flip flopping, and angered his die hard Brexiter fans. He should (IMO) have played a slightly longer game, (for once) stuck to his "principles" (pretending he has any) and waited, the job is going to open up one way or the other in the next few months. This just makes him look even more of an arsehole than usual, if that was even possible.
So the fact that he is swinging behind the deal makes me think that is where he feels the wind is blowing. I read it as, Johnson always wants to back the winning horse, so him getting behind the deal is evidence that he thinks a critical mass of MPs are doing the same. He is a follower, not a leader.
But as I said, I have no real conviction in my ability to accurately read these situations. It doesnt seem like this is how other people understand his actions, so I am probably reading it all wrong.