For graphics I recommend getting into C first (try C programming a modern approach book) and then looking at a graphics API like SDL2 or OpenGL - that’s what I’m doing. I’m also picking up a UC San Diego course on graphics later this year.
I think the AI worries are mostly because AI seems so magical. Sure, it can spit out an algorithm, but it’s terrible at system design or anything slightly off the proven path. LLMs are beyond useless as soon as you hit any complexity. So, try building something complex (graphics, heavy DOM manipulation, games etc) maybe you need to challenge yourself a bit more etc. I’m pretty confident LLMs will not replace any seniors who can actually program and understand systems. But, if you ONLY know frontend, it may be worth broadening your knowledge.
Also consider that AI compute costs are INSANE and they are exponential, and LLMs are a huge factor worse at information compression than a human mind. I do not see this changing for decades. Consider that ChatGPT Claude etc have effectively been “trained” on all human knowledge, yet if you ask either which is bigger number “1.9 or 1.11” they always say 1.11 lol. LLMs are shit haha.
Also the fact you are already a Senior developer means more than a degree, you have experience.
Why not consider doing a Masters degree in Computer Science? You said you already have a Physics degree, I think a Masters is only 1-2 years. That would be much much easier than jumping into EE.
But, do what will make you feel best. When considering taking on studies, think how you’ll feel in 1 month, 1 year, 3 years, 5 years, 10 years time etc.
You could look into a decision matrix to weigh up your options. Come up with 10-20 priorities (ageism, opportunities, compensation, remote work ability, fulfilment … etc) and rank them most important to least, and assign increasing weights of 1 to “n” where “n” is your top priority.
Then compare your options, eg “do EE degree”, “stay in CS”, “do CS masters” etc and give a unique score from 1 to “m” (eg in this case 1,2,3) for each option against each priority.
Then multiply by weights, sum up totals and see what comes out ahead!
That’s what I do for all big life decisions. Then brew on it for a few days, weeks, and play around with the calcs.