If it's just for batteries then it wouldn't need to be to soft. Really just to keep them from clattering about in the case so pretty much any sort of foam would do. Generally the denser the foam the more expensive it is. You would get good results with a soft foam & a craft knife with a bit of care. That's probably how I would do it.