smol case for the readily available pwm controller modules…
(first make in the uploaded picture used old tolerances; cover should sit flush now)
I recommend using a few drops of superglue to keep the cover on.
for one of these https://www.amazon.com/dp/B08T5TJWYH
(example)
It's possible to fit the capacitor inbetween the terminal blocks if you bend the leads and resolder it again; If you don't want to modify the model or the module, the available remix has a slot cut out for the capacitor.
The author marked this model as their own original creation.