I own a Logitech Extreme 3D Pro [X3D] joystick. Nothing special, but amazingly cheap, yet durable and functional for the price. Sort of the vanilla Ford F-150 of joysticks. I've had it since June of 2009, but recently it's been giving me more and more grief. The Z-axis (twist handle) is having a very hard time centering, and no matter how many times I either unplug the USB cable, and plug it back in; or re-calibrate the joystick, the z-axis will continue to favor one side over the other-- usually the right side. What's more, sitting still without being touched, the test bar on the settings display will often times jiggle back and for on its own off of "top dead center". This makes for some rather difficult steering if I can't keep the car centered on the road. Is this an indication that the joystick has served me well for 11 years, but that it's time to let it go?
I had one of those joysticks a few years ago. It worked fine for a while, but then got the same issue you have. It's probably best you replace it.
You could try disassemble the joystick and clean the innside and contacts with some electronic cleaner, they are usually pretty easy to work on. If you are looking for a cheap gamepad that is much better for driving games than a joystick would highly recommend the Logitech F310 or the Logitech F510 if you can find one. I'v owned my F510 since 2008 and it's been great, sadly there is a break in the cable so i have to cut the cable and re-solder it to the PCB. But i can't find my solder wire so in the meantime i'v ordered two new F310's since the F510 is no longer in production, the difference between the F310 and the F510 is vibration that i dont use anyway.
You could also try the BeamNG remote control app in the meantime. It works a lot better then you might think.