Another way?
As I read through the posts, I had an idea for another solution, however my understanding, or lack thereof, of programing may influence it. I believe it may be possible to make a rule to only fill the locomotive at certain industries, such as water tanks and refueling locations. However my programing skills are about 25 years out of date and I don't know how to make such a rule.
The biggest complication I for see to this rule would be primarily the addition of a tender. Servicing only the first unit may work for tank locomotives and diesels, however the introduction of a tender or multiple units will invalidate that approach. I'm not sure how a tender is identified to the AI and that is were I for see the problems.
So take the idea and run with it if you want to, just tell us how it turns out.