Reciprocity failure is for film. Crudely put, it means that if you take a long duration exposure you have to make it even longer because the chemistry of film becomes somehow desensitized. I never quite understood the mechanism, but it appears that if you slowly expose it it responds worse than if you got it all in a fraction of a second.
Digital is blissfully free of that.. feature.. instead we have to deal with accumulated noise over time instead.
But then there's diffraction, an optical effect that steps in at narrower apertures that can reduce the sharpness of an image. A quick search suggests that, for example, diffraction sets in around F11 for a 20D. The smaller the pixel pitch, the sooner the effects are felt. It's not a uniquely digital problem, but the high resolution of digital sensors might make it more noticeable.
As to the way narrow apertures treat fireworks shots, I have a guess that they have a unique benefit. I've elaborated on this before... it appears that "point sources" (think a star in the sky, it's effectively a single point of light) behave differently than area sources of light. If you narrow the aperture it'll effect the area sources more, so things like lit up buildings will grow dimmer faster than the point light sources, it's supposed to be the ratio of the aperture to the focal length that determines the brightness of point sources instead of just the aperture.
So my guess is that, in terms of fireworks shooting (fireworks probably look like point sources to a camera), what you're doing is effectively reducing the brightness of the buildings more than you are the firework trails. It probably also further dims the illuminated smoke. So it allows you to shoot longer exposures without blowing out the buildings yet doesn't dim the fireworks as much, but probably makes them sharper and more defined, like narrow trails instead of blown out paths.
I hope that made sense, I'm having difficulty elaborating on this concept that's fairly well defined in my mind but hard to communicate. What I'm getting at is that for a longer exposure the individual fireworks aren't necessarily any brighter, I mean a single firework trail only occurs only a small period of time, it's not constantly glowing over the entire exposure. So you don't necessarily want to dim that too much, but the buildings are lit over the entire time span so are in more danger of being blown out. So this point source thing may conveniently allow you to capture more fireworks in a single frame without blowing out the foreground.