So worst case scenario is that you start web dev and you are out of a job in 10 years?
So lets do the math:
First year salary: 40-80k depending
Move to a second Job after a year: 80-100k depending
Move to third job : 100-120k depending
Potentially peak here–
So thats 7 years at about 100k a year + 1-2 Years of less So you will likely be out of a job with about 500k+ dollars saved. assuming you live modestly (*because you are anticipating being out of work)
So whats the real question in my opinion ->
“Do you think you can switch to a different I.T. field with 500k dollars and 10 years experience as a web developer, with atleast 5 years experience of mid/senior level roles?”
And my answer to that is an unequivocal YES
p.s. if you are in a country that doesnt pay these rates, simply learn english and apply for jobs in germany for example.