Can I use Grapploct's "Octolock" attack to a new Defending Pokemon if the previous one switches out?
If you use the attack again, yes. You just can't apply more than one Octolock effect to the same Defending Pokemon.
Source: Sword & Shield FAQ (2020-01-24), TPCi Rules Team (2020-02-06)

Relevant cards

Note: All applicable cards may not be listed below.
SWSH1_113
SWSH1_113