Very interesting demo
I noticed you don’t actually use a physics engine for that, but kind’s built your own thing. Unless I am missing something - any reason you choose to implement motor and joint physics on your own?
To answer your direct question - The local axes of the wheel change when you rotate it constantly. I think the rotation axes should be calculated according to the car’s current state, and that you should add joint-elements to do the actual wheel rotation. So - either calculate current rotation in world space for each frame, or connect an object to rotate, and to it connect the wheel, which will preserve its local axes.
I don’t have a working example (and I am sure someone from the community will do a far better job than me), and this is, of course, just a suggestion