I believe the story of piercing insects and having to undergo some retribution is part of the story of Mandavya, who was impaled by a set of soldiers of the king when they mistook him to be some robbers. When he met Dharma and asked for a reason, Dharma mentioned that it was due to the fact that he had tortured (impaled) birds and bees as a child. Out of anger due to the disproportionate punishment for the crime, Mandavya cursed Dharma to be born on earth and that leads to the story of how Vidura was an incarnation of Dharma. He also established that actions of children should not be considered to have such repercussions. I think the above story belongs to the MBH but I don't have links to justify it. I read this for the first time in Rajaji's Mahabharata (which is not the same as Vyasa's / Janamejaya's version).
That was the back-story. Now I see many people in this site asking how something happened in Mahabharata and ask for justification. It should be understood that MBH happened close to the beginning of the Kali Yuga, and morals were bad throughout. The stories we read there have all of the good and bad people participating in this breach of Dharma throughout, and only in some cases there are explanations. We should not consider all actions done by the Pandavas as noble, or all actions of the Kauravas as evil. This was a time when there was general moral decrepitude. The stories are historic and not a lesson in morality. Very few people come out clean from the MBH. Arguably, the reason the Pandavas won was because they had God (Lord Krishna) on their side, and not due to moral superiority.