True enough, as long as no steps/pulses are ever missed being read from the encoder. The software itself would have to track the absolute position as the typical two bit incremental encoder has no such absolute position capability. When you restrict the encoder's motion to a finite range (vs. continuous rotation), one missed state change from the encoder would create a mismatch between the calculated/assumed position and the physical/actual position of the pedal.
One way to combat that issue would be to use an encoder with a zero pulse to reset the sync to a known position. This could be implemented as a switch at zero/no throttle position. Either scheme would require another bit of input in some form or other.
Rather than a full blown rotary encoder, one might consider a form of absolute position encoding with the same two bits of resolution. This would give the throttle pedal four distinct output patterns: one for idle and three more e.g. low, medium, high positions. Not ideal, but better than an on/off throttle. This type of arrangement could be polled at will as you would only have to detect current state rather than change of state. This could be implemented with mechanical switches of some flavor. In this configuration, if you go with three bits you get eight distinct pedal positions.