Missing statement information from 'LATEST DETECTED DEADLOCK' InnoDB status output
What language is the client written in?  You should test for errors after every statement (including the COMMIT) in every transaction.  That is the way to locate the problem.  SHOW ENGINE InnoDB STATUS should not, as you see, be depended upon.  More significantly, it won't necessarily catch all deadlocks.