Would attaching a heavy duty shake flashlight device to the car shock damper work well for producing energy like an alternator?
It will work but although shock absorbers move with a lot of force they don't move very far and it's the relative motion of the magnets past the copper coils that induces an electric field, so it's a lot of effort/complexity for relatively little gain.
You could capture the energy of the shock itself using a hydraulic system by using the hydraulics to drive a turbine-alternator, but trying to do two things at once like that tends to be problematic.
It would probably not work all that well. Modern alternators output 50-70A at 14.4V, for about 720W of power. That's a lot of juice. Those shake-flashlights are designed to capture perhaps 1W of power. You'd have to make them quite large and beefy.
Also, you would have a funny issue that arises when the city finally repaves your roads. Suddenly the roads are quite smooth, and generating that power becomes even harder.