Just a thought, and yes I know the odds of it happening are pretty much nonexistent, but maybe at some point Ash will catch Tapu Koko.
The reasons being, it would be an unexpected change, plus what would he have to do afterwards (outside of the obvious) after he defeated it, a sign of growth on Ash's part (and I am NOT saying that training non-legendaries isn't a sign of growth!!! I am saying it would show far how he has come since he was able to catch, befriend (in either order), and train such a rare and powerful species, plus it could be used as a means to make Ash's other Pokemon train harder. Heck Tapu Koko (or any legendarie or experienced Pokemon) could even spar and teach Ash's Pokemon so that they one day be on its level or even surpass it!!!!!!
Another thought which again I know isn't likely going to happen (like 0%) he could instead catch one of the UBs for the same reasons as I mentioned above. Or even catch and raise Cosmog (or two) into Solgaleo and/or Lunaala. again these are all just thoughts.
They gave Ash a Greninja with a unique transformation and had him get rid of it, so its not like their above giving high powered Pokemon and having him get rid of them (not trying to bash).
He could release Tapu Koko afterwards to continue its Island guardian duties, or release the UBs back in their home dimension (unless the writer's decide to be benevolent and let him keep them for one reason or another) and Solgaleo/Lunalaa could be given to maybe some kind of group of people dedicated to finding and sending the UBs back the their home dimension.
Greninja's is different. Greninja isn't a legendary. Greninja got the special transformation because they were lazy and didn't want to write a Mega Stone and Key Stone hunt quest so he could get Mega Zard Y.