Heat the oven to 190 C / 375 F. Slice the courgettes 4 mm thick, toss them in a colander with 1/2 tsp salt, and leave them over the sink for 15 minutes.
While the courgettes drain, slice the peeled potatoes 3 mm thick and slice the onion thinly. Put them in a 30 cm / 12-inch bowl with the mint, 3/4 tsp salt, the pepper and 70 ml olive oil. Toss with your hands until all the slices are coated.
Squeeze the courgettes in small handfuls until only a few drops come out. In a small bowl, mix the ricotta and feta, breaking up the feta with a fork.
Brush a 30 x 22 cm / 12 x 9 inch baking dish with 1 tbsp of the oil. Layer half the potato mixture, then half the courgettes, then half the cheese in spoonfuls. Repeat with the rest. Press the top down firmly with your palm and drizzle over the last 1 tbsp oil.
Cover the dish tightly with foil and bake for 45 minutes, until the potatoes start to soften.
Remove the foil and bake for 30 minutes more, until the top is golden and a knife slides through the center with no resistance.
Let the pie rest for 15 minutes, then cut it into 6 pieces and serve warm or at room temperature.