How can I attenuate a video signal in discrete steps using digital control?
Yes, there are digitally controlled attenuators. They are referred to as digital step attenuators and are available from numerous semi-conductor vendors.

For a low-budget homebrew build, you could attempt to add digital control to a basic switched step attenuator. Consider the following ARRL schematic as a starting point:



Reference: https://www.arrl.org/files/file/Technology/tis/info/pdf/September1982_Attenuator.pdf

You would need to replace the DPDT with a solid-state alternative. CMOS analog switches may be right at the edge of having too great an on-state resistance. In which case small signal NMOS elements would be required.