The easiest and best way to replace the foam is to just use an exacto knife on the inner bead. Try to cut as much of the rubber out as possible. But, dont spend too much time on it because its OK to leave a some of the tire in the bead.
Pull it apart, take out the old foam, but new foam, in and re-glue it.
Superglue works just as well if not better with some of the rubber still in the bead.