Consistent, long term training is the key. We always raise our own ranch dogs and exposure to the birds while under your control at all times is important. Pups should never have access to the birds unrestrained and/or unsupervised. Pup's start going out with me to do barn chores as soon as I bring them home at 8 weeks old. They are on a leash and they stay on a leash for many weeks. That way I can discourage bad behavior, even the thougth of bad behavior, the instant it happens as well as praise and reinforce good behavior. This goes on for quite a few weeks, eventually the chickens become boring, old news to the pup. But training continues. Eventually pup just trots along with me, leash dragging, still under watchful eye. Long story short, the end result is a good farm dog who couldn't care less about the chickens. My current dog even vacates her bed for my tiny Golden Sebright hen.
You do have to consider breed and natural tendencies. I don't know about Pug's or Chihuahua's but Daschshund's often have a naturaly high prey drive. It really boils down to each individual dogs temperment as to whether or not they'll ever be trustworthy around chickens. Some dogs just can't resist the temptation. So train consistently every day and watch your dogs response to the birds. A dog that stays over excited, trembling, drooling, intense interest, even after months or longer of trainng, is probably not a dog you are ever going to want to trust with your birds. In that case, plan to keep dogs and birds separate at all times for the sake of the birds. A dog that relaxes with time and is more interested in the chicken poop or digging in the dirt etc. then in the birds themselves is probably a good candidate!