You either need to immobilize the pencil in a separate container or put something on the end of the pencil to absorb the impact of being hit. Erica covers immobilizing the pencils well so I will focus on impact protections. Several products will be shown here. I am not endorsing any in particular but showcasing some different designs.
You will see several commercial options in the form of caps. Many variations of materials e.g. metal, plastic and leather as well as more complete products like you would see in a normal pen cap (the enclosure plus the clip to give you an example). In theory, quality and longevity play a part in selection.
Image from choosingkeeping.com
The problem with most of those caps comes from the length of the point you are protecting. Also, some rely on pressure exerted on the shaft of the pencil. The end fans out as you push it on the pencil. Keep a good grip but you could argue that it mars the shaft if you push too hard or too far. This is more an issue with the metal varieties but you could still get some compression on the plastic ones.
Not all work like that though
Image from mochithings.com
Not sure what those look like on the inside.
Caps would be more beneficial if there was fewer pencils you were transporting / keeping at one time. This also allows you to keep the implements in the same case as other related tools like erasers and sharpeners if you don't already have a means of doing so.
There are DIY options like making your own from a small piece of leather or tape and paper in quick fix but those are less useful when it some to long exposed graphite and cores.