to dim the interior light of a car when the door is closed, could a large cap be used to charge when the light is on and discharge when the door is closed, dimming the light?
Generally this would not be the way to do it. This would require a very large cap, the speed of dimming would vary greatly with how many lights were hooked up to it, and it would tend to draw a large inrush current when turned on unless special circuity is added.
This is certainly done with PWM. It's cheaper to mfg and will behave more consistently.