So far for me this has worked perfectly well.
Get 3-4 guards in a party. When you find enemies, tell them to attack at the enemy’s location, then take the flag away just before they get there. They should be close enough to automatically attack the enemies, then walk back to town when done.