Heat oil in a saucepan over medium heat until it slips easily across the bottom. Add onion and salt; cook until translucent, about 5 minutes. Add leek. Reduce heat to low and add 1 tablespoon stock if onion or leek start to stick.
Stir in mushrooms. Cook until starting to brown, about 5 minutes. Add squash, potatoes, and 1/2 cup stock. Add 1 teaspoon sage and 1 teaspoon thyme. Season with salt and pepper. Cover to keep the moisture in; simmer on low, adding more stock if needed, until squash is soft, 20 to 30 minutes. Add remaining sage and thyme halfway through the cooking time.