The threat of terrorism is not in decline and only a fool would say that. Death from terrorist incidents have declined, true, but much of that is the due to the benefit of better security. You’ve committed a very basic error in statistical inference. You argue a decline in incidents means the underlying problem is declining. But that’s a false conclusion. A possibly more accurate conclusion is that all the effort devoted to counterterrorism has had some effect.
Here’s an analogy: a mall is plagued with shop-lifting. It hires a few mall cops and, lo and behold, the shoplifting declines. Your logic says the shop-lifting problem has diminished and we can therefore get rid of the mall cops. Can we? The shoplifters are still there, ready to plunder away if the cops disappear.
You also seem to contradict your own conclusion, “terrorism is not a problem”, by correctly pointing out the growing danger posed by ISIS fighters escaping the destruction of their caliphate. You effectively forecast a rise in terrorism as they shift tactics and go underground. I agree. The war against violent Islamic fundamentalists is a long war, a 30 years war. It is not over, premature celebrations notwithstanding.