Heat olive oil in a large, deep frying pan or saucepan over high heat. Add the beef, break it up with a wooden spoon, stir in salt and pepper, then cook until browned. Next, add the garlic and onions, stirring until softened (about 3 minutes). Add the carrots and celery, cook for 2 minutes, then stir in the tomato paste and ketchup. Sprinkle the flour over the beef and stir to combine.
Pour in the wine and stock, bring the meat sauce to a boil, then reduce heat to low. Stir in Worcestershire sauce, thyme, rosemary, crumbled stock cube. Softly simmer for 30 minutes, stirring occasionally, so it doesn't get caught at the bottom.
After 30 minutes, the sauce should have reduced significantly. For a thicker gravy, increase the heat and stir constantly until it reaches your desired consistency. Have a taste and add more salt or pepper to your liking if needed.
Pour the meat and gravy into a large 8-cup dish, then level the surface. Leave to cool at room temperature while making the mashed potatoes.
Preheat oven to 180°C (350°F). Chop the potatoes into quarters or six to eight pieces depending how big your potatoes are (about 2 inches / 5cm). Place them in a large saucepan and pour enough water to cover them by about 2 inches. Bring water to a boil over high heat, then reduce heat to medium-high. Boil the potatoes until tender, about 15 minutes, or until easily mashed with a fork.
Using a colander, drain the potatoes, shaking off excess water. Let the potatoes sit in its steam for 60 seconds to help dry them, then return the potatoes back into the same saucepan. Mash in the butter and cheese until melted, then add the milk and salt and mix to combine. Have a taste and add more salt or pepper to your liking if needed.
Scoop the mash onto the meat and gravy with a large spoon; then, use a spatula to smooth the top. Use a fork to roughen the edges, to create some texture for crispy bits, and then sprinkle with some grated cheese on top. Bake in the oven for about 35 to 40 minutes, or until the top is lightly golden, and the filling is hot. Let the pie sit for 10 minutes before serving. Sprinkle the top with parsley, if using.