The traditional version's moral seems to be about the consequences of being too self - assured. But in a version where the gingerbread man helps others during his escape, the moral might be that even when you're in a difficult situation, helping others is a good thing. Also, if the story has a version where the creator of the gingerbread man is at fault for making him too lively, the moral could be about taking responsibility for your creations.
In the original version, the moral could be that overconfidence can lead to your downfall, as the gingerbread man was so sure he could outrun everyone but ended up getting eaten. However, in a modified version where he outsmarts everyone, the moral could be about the power of intelligence.