Using a mandolin or sharp knife, thinly slice the zucchini into rounds or ribbons about 1–2mm thick. Place the sliced zucchini into a colander as you go. Thinly slice the red onion and add it to the colander with the zucchini. Sprinkle the salt over the vegetables and toss thoroughly to combine. Place a plate over the vegetables to weigh them down slightly, then set the colander over a bowl to catch the liquid released. Let the vegetables drain in a cool place, or the fridge if you prefer, for 3–4 hours or overnight. This process draws out excess moisture, resulting in crisper pickles. I like to give the vegetables a gentle toss halfway through draining for even brining.
While the vegetables are draining, sterilise two 600ml jars and their lids. You can do this by placing them in a preheated oven, boiling them in a large pot of water, or running them through a dishwasher cycle. Keep the jars warm until ready to use, as this helps prevent them from cracking when filled with hot liquid.
Once the zucchini and onions have drained, transfer them to a mixing bowl. Add the chopped fresh dill (or dried dill) and the sliced red chili pepper to the vegetables. Toss well to evenly distribute the dill and chili throughout the mixture.
In a small non-reactive saucepan, combine the white wine vinegar (or apple cider vinegar), sugar, and caraway seeds. Bring to a gentle simmer over medium heat, stirring to dissolve the sugar completely. Once the mixture is hot and the sugar is fully dissolved, remove from the heat. I always recommend letting the brine cool for about a minute before pouring, as a sudden temperature shock can sometimes dull the flavors of delicate ingredients.
Firmly pack the zucchini, onion, dill, and chili mixture from Step 3 into the still-warm sterilised jars. Press down as you fill to eliminate air gaps and fit as much as possible. Pour the hot pickling liquid from Step 4 over the packed vegetables until fully submerged. Use a clean knife to gently remove any air bubbles from the jars. If needed, top up with more pickling liquid to ensure all produce is covered. Secure the lids, making sure they seal tightly.
Allow the sealed jars to cool at room temperature on a wooden board to prevent thermal shock. Once completely cool, check the lids to ensure a vacuum seal has formed (the lid should be slightly inverted inwards and not flex when pressed). Label the jars with the date and contents. Store in a cool, dark place for up to 3 months. Once opened, refrigerate and consume within 3 weeks.