Weird interaction makes trackpad's zoom not work

Hello,

I figured out how to re-set the setting using a system call:

defaults write com.apple.AppleMultitouchTrackpad TrackpadPinch 0
defaults write com.apple.AppleMultitouchTrackpad TrackpadPinch 1

Seems to work for me. Also I attached the thing using Hammerspoon to Cmd+§ using this:

hs.hotkey.bind({"cmd"}, "§", function()
  hs.task.new('/usr/bin/defaults', function(exit_code, std_out, std_err)
    hs.task.new('/usr/bin/defaults', function(exit_code, std_out, std_err)
    end, function(exit_code, std_out, std_err)
    end, {'write', 'com.apple.AppleMultitouchTrackpad', 'TrackpadPinch', '1'}):start()
  end, function(exit_code, std_out, std_err)
  end, {'write', 'com.apple.AppleMultitouchTrackpad', 'TrackpadPinch', '0'}):start()
end)

Now I'm trying to cause the issue again to see if there's any way to identify it.

Best regards,