Had to go out and get a new dishwasher! Ours works fine, only 5-6 years old. NEVER put a container that has held mothballs in a dishwasher! Handwashed the jar and loaded it into dishwasher in the evening. Next morning when I went to run the machine, the smell knocked me over. 4 gallons vinegar, 2 gallons bleach, 10lbs baking soda and 3 lbs activated charcoal- still reeks! Called manufacturers, only other option, replace machine! I'm sick over it but thankfully hubby is being understanding.
I made the mistake of washing my countertop compost bin in the dishwasher - holy heck! What a smell. Took me WEEKS to get rid of it! Like you I tried vinegar, baking soda, bleach, extra soap... nothing worked until I used some Lemi-shine. I used to have to use it all the time with my old dishwasher to get the hard water stains off the dishes, but I remembered that it also helped clean the dishwasher. Finally got rid of the smell.
Sounds like yours was way worse though. I wonder what's in mothballs that it infiltrates so completely?