I wouldn’t think this is at all possible. The operating system tells us where the mouse is and the mouse is a device designed to point at things on the screen: there is no meaningful concept of values beyond the screen pixel dimensions. PsychoPy can’t extract anything out of the mouse other than what gets passed to it from the operating system. So when you say “Tracking just the cursor position will not do.”, I’m afraid that the cursor position is the mouse position for all intents and purposes. i.e. when the mouse hits a boundary, there is simply no further change in that dimension that can be measured: we can only read it through layers of software.
Additionally, there is a lot of processing of mouse movement to generate the screen pointer signal. The screen cursor position doesn’t map linearly to the physical motion of the mouse. i.e. the movement of the mouse pointer is driven by velocity and acceleration, not just displacement. (e.g. a 1 cm displacement of the mouse when moving quickly produces a much larger displacement of the pointer on the screen than a 1 cm displacement of the mouse when it is moving slowly).
i.e. in summary, a computer mouse is not like a piece of laboratory equipment that gives us reliable measurements of a physical quantity in the world. We only get to access it via layers of intervening software.