According to Patrick Sweeney's book, The Gun Digest Book of the Glock, it's his opinion that .40 S&W kabooms are not from lead fouling the polygonal barrel. He suggests that there are two other factors involved, a) lead fouling in the "leade" which is the part of the barrel chamber just before the start of the rifling and b) bullet setback. His theory proposes that the lead fouling in the leade can prevent the cartridge from fully seating in the chamber causing an out of battery firing that may cause a kaboom, especially more so if there is some bullet setback. For these two reasons in addition to using a smaller bullet less than 180 grains, using a hard-cast lead bullet should not be a problem as long as the leade and barrel are cleaned more often (my opinion).
As I have mentioned in other threads, I do not use 180 grain bullets because there is not a lot of space left in the .40 S&W case when loaded with 180 grain bullets. There are numerous articles supporting this theory. As many know, bullet setback can and will increase pressures inside the case and the barrel chamber. In any event, Sweeney opines that hundreds of millions of .40 S&W rounds are fired per year through Glocks with an estimate of maybe 9 or 10 failures, so you have a better chance of winning the lottery than having a kaboom.
In addition, because the .40 is not fully encased within the Glock's chamber, a case that is re-worked several times may fail earlier in a Glock than one used in a chamber that fully supports the case because the Glock expended case has to be re-worked that much harder during the reloading process.