Heat the oven to 180C (160C fan)/350F/gas mark 4.
Peel the onions and cut them into thick slices.
Put the oil in a large casserole dish over a medium flame, then sweat the onions until soft and golden, rather than brown.
Meanwhile, peel 4 potatoes and cut them into fairly thin slices.
Turn off the heat, scoop the onions into a bowl and use the sliced potatoes to line the base of the pan.
Tip the onion back into the pot along with the meat and thyme, season generously and pour in 850 ml cold water (if using boneless lamb, use 500 ml lamb or chicken stock and 350 ml water).
Bring the liquid to a gentle simmer, then cover the pot with a lid, foil or a baking tray, and bake for an hour and a half.
Meanwhile, scrub the carrots and peel the remaining potatoes, then cut both into large chunks.
Test the meat - if it's still very tough, cook for another 30 minutes before adding the remaining vegetables; otherwise, stir in the chopped carrots, put the potatoes on top and cook for roughly another 30 minutes, this time with the lid slightly ajar, until the meat is soft and the sliced potatoes at the bottom are all but disintegrated.
Unless you particularly relish lamb fat, set a colander over a heatproof bowl and spoon the stew into it.
If you're planning on eating immediately, spoon off the grease from the top of the liquid in the bowl, then recombine the liquid with the stew.
Otherwise, chill the gravy separately, then lift off the solid fat from the top before returning it to the casserole.
Gently heat the stew until hot, taste the gravy for seasoning, then serve topped with chopped herbs, if using, and steamed greens or pickled cabbage on the side, plus bread to mop up the gravy.
