> how many more years do I need to work in tech?

The right answer should be "until you are able to do it".

That's the whole premise of welfare. Anything less or more is privilege/vice

Working in tech until you are able to do it is sage advice, but getting employers on board is difficult. Usually being able to do it is a prerequisite to begin working in tech in their eyes.