Rainer touched on the endgame but it has some highly instructive points.
For starters, Rainer says LHO probably does not have only 4 hearts since they pitched a heart. That is not really true, as with 2434 they were squeezed on the spade and would probably be forced to pitch a heart. However, that is the main gain of cashing the heart, you make on any club layout in that case (cash the heart pitching a club and play a diamond).
You were probably trying to endplay LHO if they had the CJ, however consider this position:
Say that you erroneously exited a diamond without cashing a heart. It seems like you are OK since LHO is endplayed, except he can exit the JACK of clubs. Now you will be forced to lose a club or a spade in the endgame since your tricks are tangled up. So the endplay does not really work.
Let's say LHO has 2533. If RHO has the CJ you are dead, and if LHO has the CJ it looks like he can do the same trick of exiting the jack of clubs right?
Well no, actually the CJ does not work here. After winning in dummy, you cash the diamond and RHO is squeezed in the blacks (if they pitch a spade, club to your ten claim and if they pitch the club run the clubs).
So your line wins when LHO has specifically 2533 with the CJ. That is much less likely than LHO being 2434. Also, cashing the HK always wins on any club layout when LHO is 2623, RHO is just triple squeezed. But you have to make sure to pitch a DIAMOND not a club this time.
Interesting is if you are going to play LHO for 2533, another possible line is to cash the heart king and pitch the diamond, and exit with a spade. This endplays RHO while setting up your spade, who is more likely to have the CJ since they have 4 clubs. Except...
By now you probably guessed it. RHO exits the jack of clubs and your communications are too messed up.
I think that the right line in the endgame is to cash your heart pitching a club and exit a diamond, which would fail. I also don't think you have any reason to believe LHO has the HQ, usually especially gibs do not lead from queens, T9xx is a perfectly normal lead and it's perfectly normal for RHO to duck with Qxxx since they don't know if their partner has T9x or not. Your line was extremely bad though, the other line should be to cash a heart pitching a diamond.