For myself, my first career was wrecked by new technology. Now I am 40 years old in an entry-level SWE position alongside 22 year olds working under people in their late 20s or early 30s. Not only would none of these people accept me as a source of knowledge but they can hardly bare to give me the time of day. I am very proud of my contributions to the team and I don’t hold it against them, but the makings of dignity are taken for granted far too often.
Someone dear to me could have started SWE at 38 but felt as you do and quit. More than 12 years later they would be a veteran at the job but instead today still are looking in from the outside saying 50 is too late, regretting their decision and making excuses just like they said at 38. Wrong then, wrong now.
12 years from now you will probably kick yourself for worrying about what worries you today. I am proud of you for making a change; stick with it! Few industries consider you senior after 3-5 years.