> if (some) animals don't feel pain, then how do they know to avoid dangerous behaviours? What is the mechanism that keeps them from, say, jumping into the fire?
This is exactly why the robot analogy originally raised by Hendrikto is so powerful. Robots/neural nets/etc illustrate that it is possible for an agent to avoid dangerous behaviours without being motivated by feelings.
I agree that this doesn't prove that insects don't have feelings - it shows that an agent doesn't need to be conscious to exhibit these sorts of behaviours.
Where I disagree is your claim that it has no bearing at all on the argument. It does bear on the argument, because it presents an alternative hypothesis that doesn't involve attributing mental life to insects. Very (very) roughly speaking the alternative is something like "an insect brain is a neural network, which, while not created by conscious designer, was chiseled by evolution to respond to stimuli in such a way that dangerous behaviours are avoided - in much the same way that an atari-playing artificial neural network trained by reinforcement learning avoids dangerous behaviours that will end the game - and just like the ANN playing atari, no consciousness is required - just the right model parameters. And similarly, no conscious designer ever explicitly told the neural network what to do. The programmer just set up the right incentives, in the same way that nature set up the right incentives for the insect."
I can see the arguments on both sides, but I think the "insects are kinda like robots" hypothesis is more plausible because an insect brain has a more similar number of model parameters to a deep q learning network than it does to a human brain.