Could it help if the driver have those axes assigned to a different key to allow AHK to pick that up and AHK can change it as axes? I done that with my XP-PEN AC-19, I assigned the dial wheel to different keys in XP-PEN software and AutoHotInterception with AHK to pick that up. Then assigned it with wheelup/down depending on what active window I am on.
It does not expose it as a key either. You must link their proprietary driver (and sign some legal document) that then gives you an API you can use to read the position of the spaceball.