You're talking about a flocculent. There are many kinds and methods. 99.9% of the time these don't work in ponds because the proper procedure for the product aren't followed, or more likely the manufacturer doesn't provide proper directions because that would drive off customers. In sewage treatment plants and in industrial companies flocculents are very effective.
In two part systems the first part is the flocculent. That clumps particles. The second part adds particles that add to the clump to weigh it down so it sinks. As you can imagine, it's not a simple process. Add part 2 early and most particles don't get a chance to clump and you end up with smaller clumps on the bottom that are harder to filter out. Add too late and the formed clumps weaken and break up. The clumping process has a limited time.
You can try any of the flocculent products made for ponds, most "clear water in a bottle" have at least some flocculent in them because it sounds good. Weird thing is the flocculent would also clump other stuff in the bottle, like dead bacteria, which makes the entire product a complete joke. The trouble with these is you rarely see one that tells you what flocculent they're selling you or how to properly use it. If you find one with the substance listed you can look up proper use methods.
The next choice is to read what flocculents are used in waste treatment and industry and use one of those. At lease you'll have good procedures to follow as they're well documented. These can be hard to find in small amounts.
It's pretty cool you had a good experience, pretty rare. In most cases adding flocculent to ponds makes an even bigger mess.