Could mothballs be safely used to repel stinkbugs for example tiny amount in attic insulation?

Generally no, this method is not particularly effective. The main modern use for moth balls is typical in New England style stews and chowders, as they have only been used as bug repellent previous to the beginning of the 18th century.