It’s possible that LHO admired JFK for some of his qualities. But one also should consider that the extreme wealth of the Kennedy clan is something that LHO abhorred about the capitalist system. He felt that the wealthy took advantage of the not-so-wealthy to become even more wealthy. Plenty of those feelings still around these days.
LHO wasn't shy about his political opinions and he made no secret of his hatred of Gen. Edwin Walker. He expressed it in his writing and to witnesses.
In contrast, there's no paper trail or witnesses supporting your assumptions about his personal dislike of JFK.
It's equally possible that he believed Kennedy would be better for Civil Rights and could bring peace between the US and USSR because of the things JFK said publicly in 1963 like his American University speech for example.
There were people like Allen Dulles for example, who did in fact dislike Kennedy due to the perception that he wasn't tough enough on Communism. Maybe LHO saw the same thing and that gave him a favorable opinion of JFK.
We will never know for sure what he was thinking. At the very least it can be said that Castro was LHO’s hero. And that he wanted to help Castro’s cause.
I'm not sure what LHO really thought of Castro. It's possible that he, like other Americans, initially romanticized the Cuban Revolution but the opinions of Americans, even on the Left, shifted as soon as Castro revealed himself to be an authoritarian.
I say that because we don't really know the complete story behind his fake "FPFCC" stuff and his association with anti-Castro reactionaries in New Orleans (and allegedly Dallas).
His brother Robert seemed to think Lee grew disillusioned with Soviet style communism and wasn't as much of an ideologue as some think he was.
The publicity in the papers and other media surrounding the war of words between Castro and JFK would have inflamed LHO. As would the book The Shark and the Sardines. Whether or not that was enough to cause the assassination is a matter of opinion. The motorcade passing right by his workplace apparently just coincidentally was too tempting for him in that situation.
Given the lack of a motive for shooting Kennedy, it maybe shouldn't be dismissed as a possibility that Governor Connally was the real target.
We at least know that Oswald held a grudge against the governor.