You know, here is what sets Dugtrio apart:
Speed allows it to handle other Pranksters that are quick, i.e. Substitute before foes who carry Spore/Dark Void. What is the point of using Prankster if you end up 2nd and with a sleeping Pokemon?
We pointed this out already, but you're not often going to run into Pranksters who are all too quick to begin with, biggest exception probably being a few nimbler but uncommon ones like Venusaur, Arceus, and Lugia. Slower ones, stuff like Kyogre, Giratina, and Registeel, you could outspeed with a Groudon. Toss about 16 EVs to speed for Prankster-Ogres and you should be fine.
Besides, beating out other priority users is not something this set will accomplish well anyway. This set, regardless of user, needs 3-4 turns to get going. Set-up a Sub > trap > Seed or status if you're running it > Electrify spam. If the opponent gets in and starts attacking or U-Turns before then, you're either missing a Sub, don't have them trapped, or don't have any residual damage. And if the opponent has recovery or, if no seeds + Infest, Poison Heal, they can trivially stall you out of Electrify PP on such a passive set,
even if you have them trapped. (This is partly why back when Electrify was possible, it was ran on Lightning Rod Mega-Gengar, who just needed a few Electrify boosts to go on an Imposter-proof sweep.)
Dugtrio would not stay in against Ray unless it was behind a Substitute anyways... But point taken that other Ground users would handle the hit... Better, but then take an Extreme Speed next turn, and still likely be down large HP as Extreme Speed out speeds Electrify either way, and therefore Groudon with Sub/Infestation/Leech Seed/Electrify wouldn't be much better.
252 Atk Aerilate Mega Rayquaza Extreme Speed vs. 252 HP / 252+ Def Dugtrio: 235-277 (85.7 - 101%) -- 12.5% chance to OHKO
252 Atk Aerilate Mega Rayquaza Extreme Speed vs. 0 HP / 0 Def Groudon: 162-192 (47.5 - 56.3%) -- 82.4% chance to 2HKO
Uninvested Groudon has just under double the physical bulk of fully invested Dugtrio. It's not a situation of "takes the hit just a bit better but suffers still". It's "doesn't get snapped like a twig regardless of investment."
Groudon would have to carry a strong move to hit Rayquaza back to make it much better.
Which is fine, Groudon can actually hurt stuff. It could just Twaves for its trapping and just let teammates handle any fliers. By doing that, it frees up a moveslot that'd be needed for trapping and damage to use for recovery, Taunt, or other options.
In any case, the point being, you're sacrificing
a lot just to be able to outspeed, and not even necessarily beat, a handful of other priority users.