Gearboxes are definitely a weak point, and rebuilds can fail too.
If the mileage is around 60k then it may well be worth changing it and the filter. If higher and/or there is any sign of uneven gears - check forward
and reverse then be much more careful. Some boxes can be oil changed with no trouble. Others it washes out the crud keeping it all working, flushes the galleries.......and the box fails
A gearbox rebuild from a reputable ZF specialist will come with a 12-month warranty and cost around £2k - 2.5k. Much less than that and it may well have not been fully overhauled. Those costing around £1k need to be treated with some suspicion unless you are absolutely sure they have had
all the parts changed with OEM repair kits. Those kits are most of £1k on their own, plus the new transmission fluid and you see why caution is needed.
Check for any unusual noises from the transmission and the front/rear tyre wear difference. A difference of more than 2-3mm can result in failures of diffs. Tyres should be changed as a set. This is more important on staggered set-ups (normal on 19" or larger wheels with rear wheels wider than front). Non-staggered 17"/18" are not as troubled by tyres. The issue is to do with the rolling diameters. If they get more than a few % apart then transmission wind up can occur and a diff can shatter. This is starting to appear more frequently now cars are getting older and owners choose to put tyres that are not really suited to the car on (for cost reasons). The transmission should not care, but recent experience shows that if this is not monitored then things break.
Check the Buyers Guide and then make sure that every single thing works. Check the a/c works across the entire temperature range - low gas levels will shut it down. Check the thermostat sits in the middle, and for a diesel, that the Webasto aux heater (left front inside wing mounted) works properly.
It might be worth getting the on board diagnostics computer log read to see if there has been anything in the past, if that us currently causing trouble. For diesels the most common are the glowplugs and controller. If the former go then the latter will follow soon after - or often does.
Consider getting a good warranty unless you have up to £3k in the bank that you can draw on without issue.