Heat the oil in a large pot over medium heat. Add the onion, ginger, chili, lemongrass (if desired), and ½ teaspoon salt and cook, stirring occasionally, until the onion is tender, 8 to 10 minutes. Add the broth and chicken and bring to a boil. Reduce heat and simmer until the chicken is cooked through, 6 to 8 minutes.
Discard the lemongrass. Transfer the chicken to a bowl and shred the meat, using 2 forks. Add the coconut milk and bok choy to the pot and simmer until tender, 2 to 4 minutes. Return the chicken to the pot.
Serve the soup topped with cilantro and lime wedges.