I suppose that answer depends on how you are fogging and how you are controlling the small droplets of insecticide. With a great deal of effort you could cover the parts of the plant that you do not want treated, or enclose the part that you wanted treated.
Maybe I could build a mini-fogger just for this purpose and then put up barriers to control movement of the fog. However, with commercial units designed for agriculture or vector management I don't see a way of accomplishing your objective. In a case of a thermal fogger, the attempt might be hazardous and result in fire and possibly death.
It is difficult ,but possible. First you need to confine the branch in well tight cloth cage opened from one end to enter the opening tube of the fogging machine. Sellotape this opining to prevent the gaseous form from going out when operating the fogging machine .The dead fallen insects may be collected by an aspirator for counting. Salam and best regards .