It's a lot easier to catch the cocoon forms than to catch Wurmple. Wurmple has a very complicated equation for it, which can be summed up as "random." However, for curiosity's sake, the chance of getting Beautifly and Silcoon is lesser than 1% higher than Dustox and Cascoon. Not much of a percent, but still Beautifly is so slightly more common. It's based on the calculation involving just personality value, but one value is enough to doom you. It's the same value that generates all those spinda spots on Spinda... A Pokemon's personality value is a 4byte value that determines a Pok?mon's nature and gender.
Because Spinda spots and Wurmple's evolution is based on the same value, we can conclude that all the variation on Spinda spots is the same as the different amount of ways to get either Beautifly or Dustox. This number comes up ot the exact value of 4,294,967,295, so this means that there's approximately 2.14 billion ways to get either a Dustox, or Beautifly (the chance of getting Beautifly is just slightly higher by a few 100 ways or so, which is very little compare to 2.14 billion though).
So why bother trying to work out 2.14 billion ways to get a competitively worthless Pokemon? Let's just call it, "random."
Trainer's ID does not matter, or else Wurmple's evolution will be affected if it's ever traded.