I think at the end of the day, software has bugs. And if you have an extremely well funded and intelligent group (e.g. Equation Group) looking for these holes and keeping them secret for personal use and exploitation rather than fixing them, there are going to be ways for your data to be compromised.
The phone in the San Bernardino case was an iPhone 5C, with the A6 processor. Secure Enclave was introduced in the A7.
https://9to5mac.com/2016/04/07/fbi-iphone-hack-method-secure...
Even if you couldn't infiltrate the chip foundry, you could order a bunch of the chips, reverse engineer them, and in a few months, ship a duplicate with a neutered "enclave". Then interdict the shipment to the phone manufacturer (this isn't tinfoil, it's been done) and "supply" them with your version of the "secure enclave". There's no limit to this cat and mouse game.