Elegant way to animate a binary value?
When keyframing binary values there is no need to include a "holding" keyframe as you have described before each change.  Blender knows to only switch the value at the keyframe since there is no way to interpolate a boolean.



In the above example I have visibility keyframes at frames 1, 15, 30, and 40.  Notice that I don't need keyframes at frames 14, 29, and 39 to make sure that it stays constant up until those frames.