There are tons of UX positions, and every UXer worth his salt does way more than mere UI design. But frankly, you dont sound as if an individual contributor career in engineering is what you aspire, so you could also try to get into product management, but then your programming skills might atrophy rather fast.
Research itself isn't valued much in the software industry, but working on monetizable products can pay handsomely.
You mentioned AI. It seems like much of what we used to call UI research will quickly be swept away by generative interfaces which are not based on pixel designs. Have you thought about helping an employer move in that direction? It's certainly a special new skill.