The simple answer is the job of the domestique is to assist the main contender. Now they can do this in three ways that I can think of. Set a given hard pace in certain discipline, protect the main contender from the elements or clatter someone out in a transition or biking incident. Clearly the latter is illegal and therefore couldn't possibly happen or even be considered (see F1 for examples of it never happening).
So in the swim/bike the domestique could nail a really hard pace that works everyone over. Put Phelps in the swim and he can lead the lot easily, but it will be less punishing for the next best swimmer and destroy a weak swimmer. Ditto for the bike with a top cyclist, Lance is starting to open up the bike now and is gapping the field and he is an old man. Even possible to send a flier off the front of the run at unsustainable pace to force others into their red zones too early. Leaves athletes with a weaker swim or bike suffering before the run starts or even out of contention. So if you have an opponent with a weakness you can punish to its maximum.
Shadow the contender. Simples really, help him with his weakest disciplines by allowing him to draft on swim or bike and get a slightly easier ride. Pushing at the front of bike reduces chances of breaks. Allows breaks to be caught with less effort from the main contender.
Cheating - no explanation required.
Now the difficult question. Do we have anyone capable of being a domestique for the Brownlees?
Nope. Not even if the domestique blows everything on the swim or swim/bike. If they make the same bike group as the Brownlees it isn't because they took the effort on the swim. On the bike they may be able to offer a little support but not much IMHO.
Not sure I want to see domestiques in Triathlon and becomes unfair on teams with fewer entrants.
M.eface