Jon-Sun, if you just tweak your step 2 slightly, you should be able to accomplish this without apex, like Justin mentioned:
2. Create a Trigger campaign that says, if lead received "Email X" and "Activity was logged contaings Re:", then remove from flow.Instead of immediately removing them from the flow, I'd have Marketo check a box that correlates to an account field. Then you can have a separate triggered campaign that says if data value of [account field box] changes, then remove from flow.
This way you don't interrupt/change your sales process (this is critical in many organizations), and still accomplish what you're looking for.