When Nidoking use Poison Jab and Earthquake, Sandslash is one of the best options. It uses ground-type fast/charge moves which are very effective against Nidoking while cut damage of poison-type moves.
Mudshot and Earthquake are the best fast/charge moves for Sandslash to defeat Nidoking based on DPS, EPS, and type match-up.
When Nidoking use only bug-type moves or the combination of Fury Cutter and Earthquake, Fearow may work enough even though its CP is low. Bug- and ground-type moves are not very effective against Fearow while Fearow's Drill Run is ground-type which Nidoking is weak to. Since Spearow is easy to find, picking a Fearow with an optimal moveset is not difficult.
The combination of Peck and Drill Run is an optimal moveset for Fearow as an attacker based on DPS and EPS. Additionally, Drill Run is super effective against Nidoking.
When Nidoking use only poison-type moves, Golem is the best. While reducing damage of poison-type moves, Golem's ground-type moves are super effective against Nidoking. Note that Golem is weak to Nidoking's Earthquake.
The combination of Mud-Slap and Earthquake is the best moveset for Golem to beat Nidoking.