I dont think it was ammonia (
NH3) which may have caused the death of clown loaches. pH is way too hiigh for new incoming clown loaches. I have kept clowns in Af Cichlids tanks but with some failures as some may adapt better than others. Smaller ones are not necessarily more sensitve than larger. What you consider smaller ones are not that young anyway. They are not fast grower. Maybe dead Clown loaches may have caused increase in NH3 which may have caused death of others, maybe.
Also clown loaches are notoriously vulnerable to
ICH infestations which may have contributed to death of other fish and/or themselves
.
I would not do any pwc right after adding fish (unless in case of emergency) until well settle down to new environment. As most of you might know sudden drop in temp may trigger spreading of Ich infestation. By doing pwc may have caused such slight drop which may have triggered activation of dormant eggs/sapores/zygotes. I am not saying you have Ich infestation, a possibilities.
In the future, how about Q/T new samll clowns in water close to neutral and gradually alter the the pH to main tank. All you got to do is add water from main tank per pwc (10% perhapseven less). Of course both tank should have well matched temp.
After handling few thousands of these babys and kept quite a few myself, this is what I have learned.
Hope you can use this info to good use.