Are you aware of split keyboards? I use a mistel barrocco (essentially two normal keyboard halves tied together with a USB cable) and j can’t recommend it enough
You sick bastard. Seriously, though, it's most cool that you came up with such a simple solution. Hat's off, and glad you got that pain under control.
I started using a keyboard heavily around 40 years ago and knew from carpal tunnel problems as a pianist that I'd have to be careful. My kids love to joke that my posture looks like it's from an ergonomics manual, but no carpal tunnel since 1982!
(I'm saying my approach is better than yours or would have helped, just empathizing because I would be super miserable if programming caused physical pain.)