My Bike has friction Gears so it's a case of moving the lever until you find the next gear up/down. I'm used the them and find, the few I use, very quickly.Indexed gears, correctly adjusted, change anytime, but in the saddle for a second on a climb is best. Electric type not required, it's correct indexing that matters. They will crunch a bit under load, ignore it. Years of competition makes you not worry about an odd crunch (unless it's in a knee!).
20% is insane, the most I've climbed is 225m in 3k* and that was enough for this fatblokeYou can change gear wherever you like, just make sure you do it with minimal power input to the crank.
If it's an unanticipated really steep hill, say 20% or more, then crunching the gears is difficult to avoid.
*or East Dundry lane which is 100m in 1k