it has been believed by many that the ‘locusts’ eaten by John the Baptist were these pods.

Of course many, if not most, insects are treyf, but some are not. It may well be that the locust was one of the latter. Doesn't stop the carob being known as St. John's bread.