old moped

Hello everyone

I am working on a small project with an old moped from 1977. engine is being rebuilt for sprint.
in that connection I make a torotrak gearbox
(Torotrak's Full-Toroidal Variator - YouTube)

I want a steering that measures engine speed and regulates gearbox.

case:
engine produces max hp at 12750 rpm. so when I turn the throttle, the arduino will "shift" gears so the engine rpm stays at 12750.

is rpm lowers that gear down. is rpm for high gear shift higher.

1: I need an rotary encoder that can handle the speeds maby like this?

2: servo or stepper motor to change gears.

3: An arduino who can read the speeds

hope someone can help me make that works.

with best regards
Daniel