I have had earwigs eating my balcony garden crops, so I decided to try a solution I found online: add 50/50 soy sauce and oil to a container and leave it overnight. It was filled with earwigs the next morning! So I am setting up another trap with an empty tofu dessert container.
That being said, earwigs aren’t universally bad. They help decompose plant material in a compost pile. However on my balcony, they were doing more harm than good. The ladybugs can stay :P
Any oil will work. I used canola.