Is it not more likely to be slugs and snails? I don't think earwigs eat anything as large as plants, but go more for fungi and algae sized food.
I love earwigs, since I discovered more about them. Yes they are annoying when I open the bolt on the wooden gate into my veg patch only to find it stuffed with earwigs, or when they take over my egg honesty box and get inside the egg boxes (the postie dropped his in the road once when he opened it to admire the colours but found an earwig in there
).
On the other hand, the females are very diligent mothers, washing and turning their eggs every day, so they don't get algae and mildew on, brooding the eggs like a hen and looking after their young when they are still at the white stage. If the eggs somehow get scattered the mother will search them out and bring them back to her nest, carrying them in her mouth.
If you find them inside flowers, just hold the flowers upside down and shake or tap them before you bring them into the house. I've noticed they particularly love to hide inside nasturtium flowers, down that tube at the back, so check that carefully before you put them in your salad
I don't think they do any harm in the garden but are just part of the huge variety of life. They can give you a little nip if you threaten their babies - but that's fair. Mainly they use those nippers to hold on with during mating, and to help fold their wings under the wing cases, as they are apparently very intricately folded. Not the most beautiful of the insects, but they aren't criminals - and I doubt they are the culprits in your cucumber patch.