How can I remove a portion of from the middle of a movie?
You can use Quicktime 10.x to split the movie into multiple clips, and then trim the individual clips. When you're done editing the individual clips and you save/export the movie, you get exactly what you want: one single, continuous movie, sans the parts you trimmed.

Split a movie into clips

In QuickTime Player, drag the playhead (the small diamond) in the timeline to the location where you want to split your movie.

Choose Edit &gt; Split Clip.
Your movie splits into two clips.

To split one of the clips in two, select the clip, drag the playhead (now represented by a red vertical line) to the location where you want to split the clip, and then choose Edit &gt; Split Clip.
Your movie is now split into three clips.

To continue splitting clips, repeat step three.

When you’re done splitting clips, you can rearrange your clips or click Done.



https://support.apple.com/kb/PH5884
I haven't investigated it, but there may be an analogous AppleScript API for working with clips.