Small size on turn made me think he had some kind of draw 56s, 89s, or a flush draw(even tho we block it). I dont think he would play 44 or 77 this way, maybe AKcc only...
I'd 3bet the flop all in. You block TT and JJ which should usually be his strongest overpair (along with queens) when he flats your 3bet. Let him convince himself to call it off with an open-ender when he in his own mind thinks he has the most equity and with 40bb in there in terrible shape.
I'd flat with Tc9c and Tc8c but JcTc and QcTc I think should be played all in. Or, if you flat JcTc on the flop, I don't like checkshoving the turn ace. He either has a weak draw that you dominate, now you lost a chunk of equity vs. sets and the nut flush draw. Maybe it's not optimal, but you were willing to stack off on a bad turn anyway, so why not do it when you have the most equity?
Check the flop. You block his continuing range and this board is better for the 3bet caller. As played, 3bet the flop.
What range do you give him after he raises the flop? Shoving turn doesn’t make any sense as we could be almost drawing dead to Axcc or very thin against a set. Just call turn
I think bet flop and x are both fine. I would tend to bet since I don't think I have a x range to protect here
3b flop should be fine but I wouldn't ship, just raise on the small side and let him make some mistakes