For bark on staves, I mixed up a sprayer of strong Diazinon and soaked the bark, this worked for about 6 months if the staves were outside under cover but had to be redone.
My preferred method is to remove the bark and sapwood on osage, paint the back and ends with shellac and store the staves indoors, I never had the first bug damage from over 100 staves treated his way.
I think just diesel or used motor oil would keep the bugs at bay, together that would be a sure thing.
I put used motor oil on both sides the 2X8s I use to make a bullet trap I made mainly because of carpenter bees, they have left it alone.
I watch a number of cabin building videos, when a lot of the folk set their posts in the ground, they char the outside edge part that goes in the ground because termites won't attack charred wood.
I had powder post beetles invade a piece of osage I had leaning up against the wall in my basement. I attacked each hole with a propane torch and cooked the beetles as soon as I saw the dust dropping out of holes in the osage the beetles hadn't gone in very deep but there were a lot of them.
After I torched the stave, the beetles never touched it again.
The first picture is my oil-soaked bullet trap during construction; I torched the part of the cedar posts that went in the ground. The next picture is the stave I torched, it is the one in the middle with the charred circles.