I don't think Apple has demonstrated more commitment to "building secure devices" than to "building a tightly walled garden to maximize leverage over developers and users".
I don't know of any consumer company that has taken privacy and security more seriously than Apple.
They led the way on iOS with Sandboxing, Secure Enclave, forcing HTTPS, on-device ML, on-use permissions model, fingerprinting prevention. And TouchID/FaceID both were popularised on iOS and made simple and reliable enough to be used by tens of millions.
I don't think Apple has demonstrated more commitment to "building secure devices" than to "building a tightly walled garden to maximize leverage over developers and users".
Edit: grammar