I am making a ground chicken with chilis, lime and ginger.
Are you channeling your best self with this comment? (If you're not sure, check out our Code of Conduct.)
Yes, there is danger of overcooking the ginger. I'd add it, as you suggest, when the onions are soft.