Hence, I was thinking that maybe an exposure time based on how many pixels are reaching their overexposed status during the actual shooting would be a working approach.
For that, you'd need the ability to read information from the sensor before the actual data readout, afaik that's not possible with the current design. But I already wished for this myself, "why not just engage bulb mode and let the camera figure out the rest?".
So for fireworks, you basically have to resort to trial & error and try to be on the safe side to prevent white clipping or the colors are gone. This is tricky for short fireworks w/o previous experience, when in doubt look at shots around the net and check what expo settings they were using. Last new years eve, I was using 60sec @iso200 with f8.
Few days ago I was trying to make a timelapse of a firework show. I went for a fixed exposure in every shot: well, it turns out fireworks can have a great and sudden dynamic range, so half of the pics are exposed just right, but the other half is way overexposed.
In general for timelapses use Magic Lantern, it's got built-in expo ramping and deflickering for this very purpose.
For fireworks, it depends if you also want part of the dark background visible. In that case, you want as much dynamic range as you can grab, so use Magic Lantern's dual_iso module - if exposing @iso100 it should also result in a nice blur effect for the fireworks.