Wait a minute, isn't G27 an optical wheel? Why you have problems with optical games?
It technically uses an optical encoder, but is limited in travel and reported to the PC as an analog controller no different than a pot.
The problem with the arcade games that used 360 degree wheels is that the wheels could spin endlessly and had no real center point.
The game only knows if the wheel is moving left or right and how fast. It doesn't know where center is or how far the wheel is turned.
If you crash in Pole Position, whatever position the wheel is in becomes the new center point.
So if you're playing on a G27 or any limited rotation wheel and had the wheel turned all the way left when you crash, the new center point is all the way left.
To keep the car going straight, you'll have to hold the wheel all the way to the left. It's then impossible to turn the car left because the wheel can't physically move any farther left. The original wheel spun endlessly, so it wasn't a concern.
Personally, a workaround for this is one HACK I would like to see in MAME.