Nail polish is not safe for any pets. Cats and dogs lick their paws and nails – it is a natural behaviour for them. When your pet licks his paws, even if the polish is dry, he might consume some of the chemicals, which can be toxic. Even the fumes of the wet polish can be toxic.
Then, removing the nail polish from his nails requires more chemicals, which can burn your pet’s skin. And the more layers you apply onto your dog’s nails, the more chemicals you will need to remove them, which means more chemicals that can be toxic.
A dog doesn’t understand why you are painting his toenails, and will not benefit from this action at all. So, ask yourself the question: why do you want to paint your dog’s nails? Let your dog be a dog and, if you really want to paint somebody’s nails, rather get a human who will sit still long enough and who would appreciate your efforts.