As with any car purchase there are no fool proof guides (even new cars can be problematic, though are better supported by the Dealer) other than take your time and check everything twice. If you aren't mechanically minded take someone who is or arrange an AA or similar check, budget for a Warranty.
As for the Avensis here is my experience for what it is worth. In January my X5 needed some open heart surgery, I was given a 3 series to run around in very nice but impractical for a man who works Pointers and shoots. While waiting for them to find an estate car for me a friend told me of an Independent Dealer who had taken an Avensis estate in part exchange long story short I became the owner of my first Toyota, my first diesel and the first manual I have driven since the early 80's.
The car was soooo cheap I couldn't turn it down, the only big issue was a rubbish heater which with some guidance from here and good old Google we fixed at home. Bearing in mind I brought it as a temporary cheap dog wagon it is a little gem that gets used by one of us daily.
The car is a 2.2 D4D Avensis estate on a 55 plate it had been a Taxi and had 180k on the clock, however it did come with an absolutely massive and comprehensive history 90% Toyota and a few independent services. The previous owner clearly cared about the tools of his trade lucky for me.
It is such a tidy car with plenty of room for the dogs that when the X5 was back on the road I kept it, it is now a family car for use when the kids visit or friends are staying. Mileage is now nearer 190k it doesn't drip any fluids on the drive, it doesn't burn any oil, it starts first time and drives really well at the last MOT there was 1 advisory "nearside Gearbox mount" my boys and I will do that and come August when the MOT is due I can see no reason for it not to pass. It does appear Toyota's are as tough as they are made out to be.
So buy with your head make sure all the history is sound and all the essential recall work has been done and get a warranty. Good luck and enjoy your Toyota