The only niche over Regirock is Tarrows STAB and slightly higher speed.
0 Atk Onix Earthquake vs. 0 HP / 0 Def Mew: 58-69 (17 - 20.2%) -- possible 5HKO
0 Atk Regirock Earthquake vs. 0 HP / 0 Def Mew: 73-86 (21.4 - 25.2%) -- 0.1% chance to 4HKO
It doesn't even have
that niche.
And on speed...
193 - Skarmory,
Onix (0+)
190 - Heatran (0)
186 - Scizor-M, Banette-M (0)
178 - Tyranitar-M (0)
176 - Skarmory,
Onix (0)
171 - Aegislash S (0+)
160 - Darmanitan-Z, Blissey (0+)
156 - Aegislash S (0)
149 - Chansey, Registeel,
Regirock, Aggron-M, Audino-M, Mawile-M (0+)
146 - Darmanitan-Z, Blissey (0)
138 - Chansey (8), Ampharos-M (0+)
136 - Chansey, Registeel,
Regirock, Aggron-M, Audino-M, Mawile-M (0)
It outspeeds a few things, but nothing that you really want to try to outspeed except maybe T-Tar and Heatran with some investment Who would just scoff at Onix anyway. So, while it's faster, it's not significantly enough, IMO, for that really to even matter. It's still waaaaay below average and is in speed tiers where you might want to "out-slow" in an attempt to safely pivot to something else anyway, so its speed is arguably a hindrance.
I mean, yeah, Onix
can work. But, I could make stuff like Jumpluff sweep or wall threats if I put my mind to it. And just because something can work doesn't mean it's either viable or not-outclassed.