In a mortar and pestle, crush the garlic cloves and chilies together into a rough paste.
Heat 1 tablespoon of neutral oil in a wok or large frying pan over high heat. Add the pounded garlic-chili paste and fry for 15–20 seconds until fragrant.
Add the ground chicken. Flatten it against the pan to brown the bottom, then flip and break it into small pieces with your spatula.
While the chicken is frying, cut the green beans into small ~1cm pieces and roughly mince the onion. Mix the water, stock cube, soy sauce, fish sauce, and sugar in a small bowl.
When the chicken is almost cooked through, pour in the prepared sauce, minced onion, and green bean pieces. Stir-fry on high heat until the beans are cooked and the sauce reduces into a rich, glossy glaze. Taste and adjust if needed.
Turn off the heat completely. Toss in the Thai basil leaves, optional green onions, and pepper, stirring until the leaves wilt in the residual heat.
Spoon over warm jasmine rice, top each bowl with a crispy fried egg, and serve immediately.