I expect to get downvoted for this, but after a tour in Iraq I firmly believe theres no weapon or countermeasure thats going to be unilaterally effective at arresting the concept of guerilla warfare and terrorism except negotiation. Otherwise, you end up dividing your city into red and green zones, and pretty soon even if a terrorist attack hasnt happened in a few months, terrorism is pretty successful in making peoples lives outright miserable. smoking kills more americans than terrorism in 2017, but we still have to take our shoes off at the airport.
People just want equality, some measure of freedom, liberty, and prosperity. Show up with tanks, rig an election in favor of your candidate, and disenfranchise an entire segment of the population like we did in Iraq, and you will find people will adopt all sorts of creative and clever methods to not only sabotage your mission, but actively eliminate your high value targets youve come to rely upon for 'nation building' or whatever geopolitical pursuit du-jour is popular.
In Iraq, we called it "winning hearts and minds." doing things to fix problems like providing clean water or just a few meals made incredible progress in crushing the enemies ability to recruit anyone more sophisticated than an angry goat herder. And he quit being angry once we fixed the sidewalk to the mosque.
In maduros case, he is reviled by a sizeable majority of his population. he openly ignores major problems like starvation, he engages his people with violent tactics, and he disregards basic human rights and living conditions. Nothing, no technology on this earth, will keep you safe if your people turn on you. There is no police or military force that can endure sustained guerilla terrorist tactics indefinitely. Not even the US Military.