Preflop
Obviously happy to see a free flop with garbage like this.
Flop
I would also just fold now. Even though you hit a piece of the board, you still have a really bad hand, and when he bet full pot, you are quickly getting sucked into playing a large pot of out position with garbage. The way, I look at this kind of situation is, that if someone had raised preflop, I would never have continued, and then there is no reason, why I should put chips in the pot, just because they made a silly limp and I hit some small piece of the board.
Turn
Obviously the gin card for you. I think, there is even an argument for leading now, since he might check back his TX and draws on the paired board. But checking to him is not bad either, especially when he bet so large on the flop.
River
I would bet for value to try and get a crying call from his TX. I am not sure, what you are trying to achieve by checking. He is probably a fish, since good players rarely limp, and against fish you typically just want to keep the game simple and bet your strong hands for value.
As played I am not loving it, when he moves all in. I think, this smells like a full house to be honest with you. On the flop he pots it for value and protection, because there is a flushdraw on the board. On the turn he fill up, so now he is not worried about a flush, and he check back to induce a river bet for you. And when he fail to get that, he still moves all-in, because "LOL I have the nuts". Fish are not thinking logically about, what your range look like, and which betsize create max value against that range. They are just looking at the board and their own two cards.
And even if he is thinking about your range (level 2 thinker), he dont need to risk his entire stack to get you to fold marginal holdings. He can bet like 2/3 pot and still get a solid amount of folds. So why move all in for 3 times the pot and give himself a terrible risk-reward on his bluff?
There is an old saying "never go broke in a limped pot", and I think, it applied here. Yes you have trips, but there are still a fair amount of hands, you potentially lose to, and the SPR on the flop was around 10, which is very deep for a tournament hand. So as played I would fold now and live to fight another day. But I would never have gotten in this situation, since I would have folded on the flop, and if I somehow failed to do that, I would have bet the turn or bet the river.