Hi,
I don't think there is a one size fits all solution for this available on Windows, for example SDL can be even statically linked into the executable if the developers choose it.
Back in the 90s I once saw a PS/2 mouse that had a Lock X and Lock Y toggle, it was used by someone for CAD work, haven't seen anything similar in USB format however.
I have heard that there is a "CursorAxisLocker" and "MouseAxisLocker" available for Windows, however I personally didn't used either, so I don't know how good or legit those software are, or if they are capable of working with SDL.
As all Wolfenstein 3D ports should be open sourced (unless a clean reimplementation of the whole engine), if you have a basic familiarity with C, it is a somewhat involved, but possible option to modify all SDL mouse function calls and event handling to simply ignore the y-axis and recompile the given source port, the SDL mouse interface is quite straightforward(Generally for functions the second argument is a pointer to an int(or in case of SDL3 float) variable which will be filled with the relative, window relative or global mouse y position, if events are used the it is in a structure called "SDL_MouseMotionEvent" I think the fields are called the same in all SDL versions x,y,xrel,yrel, the type changed between versions but zero is zero in two's complement whether it is a 16-bit or 32-bit integer 😀 ), so a basic knowledge of C should be enough.
"A process cannot be understood by stopping it. Understanding must move with the flow of the process, must join it and flow with it." - Dune