Each bullet creates two more "terrorists",
Not quite. Getting blown in half by a .50 round isn't exactly the best recruiting platform. Especially if they can't even spin it as a brave sacrifice facing the evil infidels/Zionists/whatevers. A bullet hitting from a mile away with no warning whatsoever is a very demoralizing thing. Terrorists actually would hate technology such as this because it is more accurate and reduces the chance of collateral damage. Collateral damage is what they want, because all their potential recruits/supporters see are innocent women and children blown up and dead-not how or why they died, only that they died.
The best thing to do is provide aid from a distance, but otherwise don't get involved. No troops, no arming one side or the other, just food and medicine.
You have to do both: provide both the carrot and the stick. Show people that fighting will only earn them a useless, painful, and messy death while peaceful coexistence means prosperity, safety, and education. You are correct in that food and medicine are important (more important than money because they are harder for government, criminals, or elites to divert) but you need boots on the ground to provide stability and protection for those communities that have embraced peace. These boots on the ground also help by building/repairing roads, schools, and houses. When communities see that working with the goverment and denouncing extremism makes them prosper they are more likely to embrace it as well. Because let's face it: most of the people fighting in the world do so because they have greivances such as lack of educational, economical, or political opportunities. Given the choice, most people would choose those over fighting. You simply have to show them that choice actually exists.