Heat the oven to 400 degrees.
Spread the potatoes on a baking sheet and bake until fully tender when poked with a knife, about 30 minutes depending on how big they are.
Let the potatoes cool enough that you can handle them, then crush each one with your palm or the back of a pan. You want to create a patty shape, with lots of craggy surface area to crisp up in the hot oil. If you have larger potatoes, tear them up into smaller pieces after smashing.
Heat ½ inch of olive oil in a large skillet until quite hot. Put a corner of a potato into the oil to test the heat—if it sizzles nicely, the oil is ready. Working in batches, fry the potatoes until nicely browned on one side. Flip and cook until both sides are browned, about 5 minutes total, but about 30 seconds before the potatoes are done, toss in some of the garlic, rosemary and thyme. Transfer the potatoes to paper towels to drain. Continue frying the potatoes, scraping out the bits of garlic and herbs between batches so it doesn’t burn.
Season with salt and black pepper and the chili flakes. Serve with a lemon wedge for each diner.