I have an application to write where a tree is touching an electric wire. Please suggest a suitable word.
You're looking for the word 'tap'.
This is how the Cambridge dictionary defines it:
Tap: To hit something gently, and often repeatedly, especially making short, sharp noises.
Example: The branches tapped against the window.
Brushing is the word.
Due to the wind the tree's branch kept Brushing against the power line. The consequences could be easily anticipated and much dreaded. I find no dictionary definition takes into consideration the physical conditions involved since the conditions do not change during the storm until the disaster.
The repeated Brushing of the branch on the power line is what causes the eventual problem.
Trees sway in the wind, and when near electrical lines, they can beat those lines like waves beat the shore. From M-W:
sway: the action or an instance of swaying or of being swayed : an oscillating, fluctuating, or sweeping motion
beat: to strike directly against forcefully and repeatedly
The oscillatory motion of a swaying tree could cause it to beat a nearby electrical line, i.e., to strike directly against it forcefully and repeatedly.