As I know, mothballs act by dissolving carbon deposits. It's the effect of the moth poison they contain : the para-dichlorobenzen*. But this product is carcinogenic, and consequently, it's now replaced by another moth poison that does not dissolve carbon deposits. I searched mothballs with paradichlorobenzen but I don't find them.
I used old mothballs (the carcinogenic ones) every 30.000Km to clean engine and injectors. It was working well, with ~10 in the diesel tank.
Now , with mothballs without para dichlorobenzen, I have heard it doesn't work

* paradichlorobenzen is also present in injectors cleaning products (but in lower concentrations)