I think this may in fact be possible.
In the Task Groups menu, make sure you've selected your colony ships, then select the tab 'Special Orders/Organization'. Under 'Default Orders (if no other orders are set)', use the drop down menu for 'Primary' to select 'Unload Colonists < 25m'. Then under 'Secondary' select from the dropbox 'Load Colonists at Capital' or 'Load Colonists at 25m+ pop'.
This way if the ship can unload colonists it will do so on a colony that does not yet have 25 million population. If it is empty of colonists, its order will be to fill up with colonists. Of course you will have to first ascertain that you do in fact have sufficient infrastructure at any potential colony to support 25 million (5000 infrastructure). That would likely require you to manually put it there with infrastructure construction orders building it elsewhere and then transporting it with freighters, so I'm not sure how much work you would be saving for yourself by automating the last bit of moving the colonists.
I have not tested this myself. I prefer to micromanage colonies, as they can usually build the needed infrastructure themselves if you seed them correctly early on, with some factories and a massdriver on the colony proper, and some well placed autominers (if not on the colony itself, elsewhere in the system) sending duranium to it.
The other basic way to automate colonists is to simply set the 'Actions Available' in the 'Task Group Orders' tab to 'Load Colonists' from where you want and then to 'Unload Colonists' to where you want to grow a colony, and then also give any necessary return orders up to but 'not' including the load order. Then check the 'Cycle Moves' box at the lower center part of the window to on. Your colony ships that you gave the order to will loop non stop between the colonists source and destination till it stops with a warning that you are out of fuel. To avoid this last, stick a refuel order in there somewhere as well.
I should append that I am a relative newbie to the game and still have a LOT to learn. I am still having issue with getting a combat fleet to function properly, so take anything I say for the moment for what it is, a suggestion to try, not gospel.