I agree with you on almost all points.
I do think that Obama needs Hillary to win to cement his legacy. Hillary won’t trash Obamacare, or overturn his executive orders or appoint conservative judges.
Trump on the other hand just might.
I don’t think that his legacy means much to him - what can it do for him after he leaves office? OTOH, becoming the replacement for the Clinton Foundation for Pay to Play will do a LOT for him.
Remember, he has to LOOK like he’s supporting Hillary for this to work.