I went with the classic fish filet knife. Worked very well.
My choice for years also. Works great. But also I am the handy guy who went to art school knows how to cut things, etc. so end up doing this not just for myself, but assigned it by my friends, etc. Have reproduced lines of foam for several cases, sometimes because surplus stuff is old, sometimes people are jackholes and leave the (big old school gas-cooled) thermal case open on a rainy night, don't tell me for a week
Fillet knife is good as it's very thin, very sharp, and long. Many other systems end up cutting in multiple passes, or squishing the foam first. Pay attention to the curve of the blade and your angle to get neat, straight lines.
And yeah, never freehand. Draw it out first. Probably just in Sharpie on the BOTTOM so no one sees the lines when done. Use a ruler. Measure twice, and all that.
If you want to make deeper cuts yet, or make a blind space such as a bottom that things can't get under, then assemble from parts. Stack the foam, plan and glue. Yes, most glues will melt foams so get some Camie 303 (that's a brand and model) spray adhesive for foams. There may be others, but that's what I use.
Most foam is compliant, so you can generally get away with ignoring curves if you plan ahead at all.