I decided to use a probabilistic approach. I pick 200 random pairs of nodes and find the paths between them. About half those paths use the cut-set edges, so those three edges will be used more than the others. That's enough to identity the cut-set.
A geometric approach to finding the solution, involving slicing up the map for part 2 into regions that would repeat, then finding how many of each I'd need for the final solution.
A day of two parts: variations on parsing the input, and some fiddling around with finding the area (which I admit, I just looked up after a bit of a struggle).
Things became much more simple when I stopped trying to be clever and instead represented the moves as actual Move records. I also used phantom types to handle the two types of move generation while keeping all the rest of the code the same.
In your game, whose decision is it, when you make the switch from earlier play to planning your show?
Whose decision is it, when you switch from planning your show to performing?
If it feels unnatural and divorced, maybe try switching up whose decision it is. If the MC's been choosing, try letting early play go on until the players decide to switch it. If the players have been, maybe jump in earlier as MC.
...Or even, try playing through a whole occasion without ever performing, if the PCs never decide to perform. That's within the bounds of the rules, and it might be revealing to try it!
Nothing much clever here. Depth first search to find the loop, breadth-first search to flood-fill the regions. The only clever bit is doubling the scale of the map to make it easy to "squeeze between pipes."