Maybe everyone has known this forever and I'm the last to find out, but I thought I'd share as it was a revelation. I middle click all the time when using a mouse, so it was nice to finally discover a replacement while using the trackpad.
Alternatively, though I don't know if it works on Mac, on X11 Linux you can middle click with touchpads by tapping with 2 fingers. Tapping with 3 fingers right clicks. That's going to work anywhere clicking does, because it's handled by the touchpad driver rather than by app convention. If it doesn't work by default, it can be configured with `synclient`.