It depends on what kind of job you are aiming for and timescales, both for qualifying and for length of time pre retirement.
Whilst AAT is a "technician" level qualification, it is perfectly fine if you intend to "practice" as a small business (yearly accounts, VAT returns, payroll, book-keeping etc) and simple personal tax returns as a self employed accountant and is generally recognised by lenders etc who require "certified" accounts and tax returns for mortgages etc. So if you were wanting to go into practice, doing small business accounts/tax returns, etc., then AAT may well be a good option. You'd just have to research their rules about what experience they require, as well as which exams/exam route you'd need to take. AAT is also good for finance jobs in, say, councils, hospitals, universities etc. Back to thinking about setting up your own small practice, it does give more retirement options, i.e. slow wind down over many years, lots of "one man" accountants continue working with small numbers of clients well beyond state retirement age as they can pick and choose which clients to continue working with, and do gradual wind down alongside other retirement hobbies, etc.
CIMA is more for management accounting within a firm, i.e. costings, systems, stock pricings, weekly/monthly accounts, departmental accounts, etc., so is pretty specialised. Maybe not too easy getting into that kind of thing as a mature/older trainee as it's often pretty cutting edge stuff, i.e. integrating different computerised systems of stock control, production management, sales order processing, etc., so excellent IT skills needed.
ACA and ACCA are more general and cover everything really. You could go into practice (although stringent requirements on approved experience having to be supervised and signed off by a practising certificate holder so you'd struggle if you weren't working in an approved training firm). But also just as easily you could go into management accounting, etc. It just takes a lot more time, the exams are harder, and you really need to be gaining working experience at the same time, so you'd be looking for training contracts with, generally, the larger accountancy practices.
CIMA/ACA/ACCA will take a lot longer, so if you're already in the twilight of your working life, you may have very few years after qualifying to actually benefit from it.
I do think you need to work backwards from your intended retirement plans.