PE foam was used for case inserts for a long time. I think it's polyethylene, closed cell, so no moisture invasion, is tough and cuts easily. I had some in a case that was 20 or 30 years old and one cut surface that was always under pressure did start to sort of decompose. But this foam is still probably the best, you can buy sheets, cost is not bad, of various thicknessnes and build up a stack, or use a thick piece. I normally sliced it with a box cutter knife, but I think you can saw it with a fast fine blade and rout it. Don't know if it hot wires, or if the gas from that is safe etc. Easy to find all this out though.
PE sheet is used is sold to various industries. If having trouble getting part sheets then you could try a friendly case manufacturer. Or just give the job to them
Pick and pluck: I don't like the idea of open cell foam. Open to moisture.