My answer will be similar to Bounty's answer with a few twists. First I'll tell you what I have, what I plan to buy and why. I currently have a '83 CJ7. It is a capable trail rig as well as a servicable daily driver. I plan to buy a '05 Rubicon in a few months. My needs are:
1. A dependable daily driver.
2. A comfortable daily driver. (AC is a must here in Houston)
3. A capable trail rig. I hunt and sometimes hunt by myself so I need a trail rig that will go where I need it to go.
4. A rig that can make those 7 hour trips to the dear lease in relative comfort. (compared to my '83 CJ)
With that being said, here is what I think about your situation. The idea that TJs are better is relative to your needs. For my needs a TJ is better than a CJ or a YJ. As for your needs, that is probably not true. TJs are great at being great trail rigs as well as being good daily drivers. You stated that you do not need a good daily driver, but only a good trail rig, so that does not apply.
This is the question you need answers to "Is a TJ a more capable trail rig?". You could get a lot of different answers to that, but in my opinion a YJ or a CJ are equally as capable of a trail rig as a TJ for a lot less money. Yes, a TJ has more flex than a YJ or a CJ stock, but with a little mods a TJ or CJ can flex right along side a TJ. A side note to that is that for a rig with lockers flex is not as important as it is to a rig without lockers.
Now to compare a CJ and YJ. They are both capable rigs. One thing that a YJ can offer is if you buy one of the fuel injected models (someone else can tell you when they switched to fuel injection). Fuel injection can be good news, and it can be bad news. First, the bad news.....fuel injection is harder to work on. I have a Holley 2 barrel and can work on it with a flat bladed screwdriver and a few wrenches. Fuel injection sometimes requires computers and such. Fuel injection is great on inclines. Steep inclines can play havoc with a carb. Some carbs are better than others, and the stock carb for Jeep is a Carter which is one of the worst carbs ever built in my opinion. I switched my CJ to a Holley 2 barrell and it performs much better on inclines, but not quite as good as fuel injection. You can also add after market fuel injection to a CJ if you choose. The YJs do have better springs. They are wider and more stable from what I have learned. They do have better road manners in my opinion. If you go with a CJ you will surely deal with some rust where if you buy a newer YJ there might be less rust depending on where the vehicle is and how many beaches and salted roads it has been driven down. I think lifts and mods are about the same price for a CJ or YJ so that should not be a huge factor. As far as axles and transfer cases go, I prefere the CJs. Mine has a Dana 30 in the front and an AMC 20 in the back with a Dana 300 transfer case. The only weak link that I have had in this package is the junk two piece axles in the AMC 20. Once I replaced those with some Superior one piece units it has held up well. One thing to consider is the motor that you get. From what I have seen and driven the 2.5 4 cylinder is a very weak motor on the road and certainly on the highway. The 4.2 or 4.0 I6 has more power at acceleration and highway speeds. From what others have stated, on the trail the 2.5 4 cylinder is a very capable motor since acceleration and at speed horse power are not factors.
The bottom line to this is that if you are looking for an economic trail rig, then a YJ or CJ are probably your best option. They can be purchased for a reasonable price and modded to be the vehicle that YOU want or need for much less than a TJ. They can be and are at least equal in capability to a TJ off road.