I believe somehow that Pakistan committed the following two biggest mistakes, in respect of its counter intelligence dealings:
1) Handing over the command structure of the ISI to military personnel, unlike RAW, CIA etc etc
2) Developing in-house proxies, for covert operations against enemy states, instead of creating these proxies in those countries or utilizing those already existing there
I wouldn't dilate upon it; but, in my view, that is why, RAW has been far far more successful, in virtually all terms, than our ISI.
Even, a large part of the Pakistan's current economic problems can also be attributed to the covert actions, executed against, it during the past about 20 years.
You bring up great points, but there are more to consider.
1.) The ISI wasn't handed over to military personnel; it was and is a military-dominated and run institution with some civilian employees. The strange thing is how it started reporting to the PM and how the PM has a say in the appointment of its head. This weird 'kichri' is unnecessary. The IB, a totally civilian intel agency, is the PM's eyes and ears already.
2.) The RAW, CIA, Mossad and SVR are all external-focused intel agencies whose sole occupation is operations in other countries (while their domestic counterparts --- the IB, FBI, Shabak and FSB --- take care of internal dissent, counter intel, counter terrorism, propaganda/local media management, etc.) The ISI, by contrast, is an "all inclusive" agency with only a part of it dedicated to external ops. Therefore, the DG has to worry about all internal and external issues simultaneously --- this job and therefore the agency should be split up to focus on external vs. internal.
3.) The fact that it is military-run in a place like Pakistan is not actually a bad thing. Military men, through the MI, etc., have a lot of checks on them throughout their career. And the examples of civilian institutions are in front of you (FIA, IB, LEAs, etc.) All are corrupt to the bone and just as incompetent, if not more.
4.) The proxies point is fair but it's not so simple. The proxies supported by both enjoy some 'safe haven' territory (Afghanistan for Baloch terrorists supported by RAW, for example.)
5.) Don't forget the HUGE discrepancy in size and budget. The ISI continuously has to punch way above its weight and deal with schemes and operations hatched by the likes of the CIA where as India is now firmly in the pro-West anti-China camp. We think many things are failures but they are actually achieving quiet strategic objectives (such as keeping 600,000+ Indian army/paramilitary troops occupied in IOK; this is the size of the entire Pak Army, roughly speaking) and is quite an achievement. Also, our intel on Indian military movements, comms, etc., is pretty incredible. That's how we knew about their plan to launch missile strikes on cities and warned them about it before hand. They couldn't believe it --- those missile bases are highly secure and comms are encrypted. But we knew.
6.) We have two main failures. The first is the fear of imagined Western criticism (who the F cares?!) which has stopped leaders in all institutions to go soft on domestic traitors. The West cleverly links aid packages, IMF loans, market access and a lot more stuff that we unfortunately need (due to decades of bad governance) to conditions such as freedom of press, etc. Instead of fighting this double standard (Saudi Arabia, a draconian dictatorship, is the largest buyer of sophisticate US arms and enjoys blanket US support, just as Israel does --- another draconian State indulging in an insane illegal occupation of and war crimes against an entire people), we simply go along with this sick logic.
The second is our inability to properly redefine the rules of engagement in the wake of India's push to establish a "new normal" where any proxy attack can result in a limited war or, at the very least, risky strikes in our territory. By accepting this premise, we are painting ourselves into a corner. What we need is influence over TTP-level insurgencies in India that are homegrown with genuine grievances and can regularly and reliably strike urban centers.
Happy to hear your thoughts.