According to the website [1], it is fairly debatable that they "feel pain" and if they do, they are anaesthetised.
> Criticism: This enables and encourages kids to harm animals
> The cockroach is anesthetized during the surgery to avoid the risk of the cockroach experiencing pain (though it is debatable whether they experience pain at all), and the cockroach adapts to the stimulation rapidly. The 55 Hz stimulation we use is the same frequency used in electrical stimulation to treat human diseases such as Parkinson's.
[1] https://backyardbrains.com/products/roboroach