You can use a hot wire to cut foam, but beware - it does give off noxious fumes.
Many years ago I used to work at a place where they also made industrial models (you know, oil refineries, rail-car dumpers that sort of thing). One of the guys used a hotwire to cut foam for geographic contours. I think the wire was powered by a 12v car battery but I'm not real sure, it was a very long time ago (20+ years).
The hot wire gives a very clean edge and has the bonus of cutting square to the top & bottom faces if the wire is set up to do that.
Personally I'd prefer a very sharp knife and a LOT of patience.
--
BluesMeister