Heat a large straight-sided skillet over medium heat and add sugar. Cook until the sugar starts to melt and turn brown, about 5 minutes. Reduce the heat to medium-low and cook, swirling the pan frequently, until the caramel is bubbling and turns reddish brown, 4 to 5 minutes.
Remove the pan from the heat and, very carefully, pour in water. Please be sure to turn your face aside while you do this so you do not get splattered. If the caramel hardens, set the pan over medium-high heat.
Stir until the caramel dissolves, then pour it into a heatproof measuring cup or bowl.
With hot water (so the leftover caramel bits don't seize up on the bottom of the pan), clean and dry the pan.
Place the skillet over medium-high heat and heat canola oil in the skillet. Add onion and ginger. Cook for 1 minute.
Add sliced garlic and cook for an additional minute. With a slotted spoon, remove the onion, ginger, and garlic from the oil and reserve in a bowl.
To the skillet, add chicken thighs. Cook until the chicken no longer looks raw on the outside, about 2 minutes per side. Yes, the pan will be crowded!
Add the reserved caramel sauce, fish sauce, ¼ teaspoon kosher salt, black pepper, and chili flakes. Mix to coat the chicken. Reduce the heat to medium and cook (the mixture will be simmering briskly) until the chicken is cooked through, turning the chicken every 2 to 3 minutes, about 20 minutes.
Stir in the reserved onions, ginger, and garlic and cook for 2 to 3 additional minutes.
Transfer the chicken and cooked aromatics (ginger, etc.) to a serving platter. Thinly slice 3 green onions and use to garnish the chicken. Serve with rice.