I mentioned above that I carry spare spokes inside the seat post, and that is all that goes inside the bike. It makes sense to me since the odds are that I will never need a spare spoke, thus unlikely to ever need to go through the hassle of removing seatpost to get to them. And the spoke sizes are different for every one of my bikes so this way the spare spokes are always with the correct bike.
If you can easily access something inside a handlebar, I can see that as a storage place, but several of my bikes have bar end shifters, the drop bar bikes that do not use bar end shifters usually have the handlebar tape folded over the end of the bar and shoved inside the bar end. Thus, that would not work on my bikes.
Not touring, I like putting it on the bike but out of the way, yet easily accessible like the downtube bottle cage that I added to my rando bike in the photo below. That is a nice little case with a zipper opening, but if forecast is for heavy rain I put the container in a plastic bag due to the lack of waterproofing.
Or the Zefal container on my light touring bike, below. The top of the tool container unscrews, so it is much more waterproof than the above one.
My road bike, I use a peanut butter jar, sprayed black for that stuff. I forgot the brand of peanut butter, the newer shrinkflatted Skippy jars do not fit but ones several years ago worked great.
But if I am touring, there usually is a water bottle in that cage instead. Thus, it makes the most sense to put this stuff in a pannier.