Heat up olive oil in a pot. Add chopped onion, 2 pinches salt and sauté until soft. Add chopped garlic and sauté until golden. Add chopped stems and sauté until golden. Add a little more olive oil if you need to. Add thyme and stir. Add sliced mushrooms and stir. Cook for a few minutes until liquid has evaporated. Make space in the middle of the pot. Add butter and flour. Mix well and cook for 1 minute until raw taste of flour disappears. Mix into mushrooms. Add 2 cups stock and stir well. Add remaining 2 cups of stock and season with 1/4 tsp ground black pepper. Taste and add salt only if needed. Cover and bring to boil.
Turn down heat to simmer, add apple cider vinegar and cook for 20 minutes covered.