Peel, wash and dice the sweet potatoes and potatoes. Cover and cook in boiling salted water for about 20 minutes.
In the meantime clean, peel and slice the carrots. Clean, wash and cut cabbage into strips. Peel and chop onion. Wash thyme, shake dry, pluck leaves from the stems and put something aside for sprinkling. Heat the oil in a large frying pan. Sauté the onion and carrots. Stir in tomato paste and thyme, fry briefly and deglaze with wine, stock and tomatoes. Split the tomatoes with a spatula, season with salt and pepper. Add cabbage and braise covered for 5-10 minutes. Put beans in a sieve, rinse cold and drain. Add to the vegetables and braise for another 5 minutes. Season to taste with salt and pepper.
Drain the potatoes. Add butter and cream and mash to puree. Season to taste with salt, pepper and nutmeg. Spread loosely on the braised vegetables as a topping. Grate cheese and sprinkle over the puree. Bake in a preheated oven (electric cooker: 200 °C/ convection oven: 175 °C/ gas: see manufacturer) for 20-25 minutes. Sprinkle Sheperd's Pie with thyme.