A fig tree is vulnerable to damage by long-horn beetles. Since the trunk of a fig tree is relatively soft, the insects make holes and go into the inside. In that case, the trunk of the tree becomes houses and also food. And then there will be so many holes on the surface and the trunk will have void inside. It quite often results in the death of the fig tree.
If it is in early stage with a little number of holes, injecting insecticide would be one of solutions. However, it means that the injected chemical could go up in the tree and reach to the fruits. So I don’t think injecting insecticide could be a solution as a countermeasure against long-horn beetles in a fig tree.
A practical solution is as follows. You need to accept the damage caused by long-horn beetles on a fig tree. In other words, you admit that a fig tree is short-lived. But it does not mean you need to give up the fruits. What you need to do is renewing your “main” fig tree in relatively short term. You make young trees using a branch and/or shoot that are taken from the existing fig tree. By keeping several young trees as the spares, and planting them every three or four years, you will get the fruits, even though some times the damage happens.
So, this year, I made three young fig trees using the existing fig tree’s shoot.
They were taken from a native Japanese fig tree. So those fruits are not so sweet because the species has not been improved like some western fig trees. But this kind is hardy and can stands for winter cold. Although its sweetness is not perfect, eating fresh is actually good. And a good thing is that I can make a lot of jam (jelly) and compote in autumn.