You could use an "old school" 3 speed internal gear rear hub. They should not be very expensive.
Sturmey-Archer & Shimano made millions of them..... Either find a used one, or by a used 3-speed bike for parts.
Only problem is they were most commonly on 26" wheels, so may not work on a standard 700c road bike.