while you certainly CAN gutload hornworms, they shouldnt be a primary food.
You want a VARIETY of prey for your chameleon. See here:
https://www.chameleonforums.com/blogs/sandrachameleon/74-feeders.html
Hornworms can be gutloaded on a purchased prepared "chow" , on dandelion leaves, sweet red or green peppers, grape vine leaves, sweet potatoe (lightly steamed and cooled), basil, etc. You can make your own chow paste (in a blender) from dandelion, grape vine leaves, arugula, mustard greens, basil, some sweet potatoe, some carrot, a little wheat germ, a dash of spirulina and a little brewers yeast.