I always thought that the Mafia's motive was thought to be that in spite of them having won Illinois for JKF in '60 (the Chicago fraud stuff),RFK came down hard on them while AG and the assassination was payback for "Kennedy treachery" (my words).
Whoever was behind it wanted it to look like a Cuban operation; hence Oswald.
By 1963, however, Kennedy had abandoned the Bay of Pigs rebels to their fate and had given the Russians assurances he would not attack Cuba as part of the missile crisis fiasco. The Kennedy's had been outmaneuvered and defeated on Cuba. Kruschev thought Kennedy was a dilettante and generally had his way with him. Why have him bumped off?
And all of the business they lost when Castro took over Cuba. Kennedy was weak on Cuba, failed to overthrow him and wouldn't try again. The mob was mad because they fixed the election for their friend-Joe Kennedy's son.
Sam Giancana's brother, Chuck, wrote a book called "Double Cross". He agrees with your theory.