for a task like that i would probably start with a (rc) servo, because they are slow heavily geared down, and now come in sizes that are soo teeney.
they can have various atributes, like full 360 turn, or 270s or 180s or 90s, they can stop at the ends, or have clutch even, there is an array of things that can go on the "spindle" of them, all the way to cut it up yourself pieces, and you can tack on something TO a normal servo motor end.
they usually come apart easily , while initally designed for a digital signal on a data line and power, there are electronic kits and stuff you can drive them with, or for that really simple rocker switch off the avilable power and nothing else, just tear out the curcuit, and wire the motor up to power. the power range of them is pretty high, and driving them with various voltages the speed is pretty adjustable (specially how highly geared down they are). Toss in some resistance so the speed and power of it is right based on your initial flashlight voltage, and a double pull double throw momentary switch that simply reverses the polarity of the battery to the small motor.
Why come to think of it, they are so small and powerfull, and so varialble in the voltage that will drive them, potentially someone could make a aspherical Mag with a quad die high power led, and move a "MAG" head up and down on removed threads, all within the space above the switch. hmmm :thinking: why didnt I think of that?
or even some way to move the bulb even, i donno. it is just one little brute of a motor that has all the STUFF ready to go already to do something like move something an inch.
at that point the only "hard" part about it, would be perfecting the mechanical connections and sliding and stuff down to a good clean straight movement, that hits the "ends" right , and lasts many many times of going in and out.
of course once you got something like that capable of pushing harder than your thumb even, making sleeves out of pipes that fit eachother , could form the holding thing to slide in and out, so that part might take either a lot of experimenting or a real actual machine shop, depending on which one you wanted to spend the time doing.