Joel,
What type of foam are you interested in tying? For example, long skinny foam like terrestrial bodies vs broad flat bodies like gurglers?
On the quick, here is a trick I learned a while back for securing bodies in general. You probably already know this technique but good to post anyway. Pre-wrap the foam with one complete turn of thread and then do your second wrap on the hook and back over the foam. When you pull tight the foam will be directly locked at that point. This works for deer hair also and this is the trick I use to get tight heads on patterns where I need to avoid “spinning” the hair or materials.