Is this spyware possible due to engineering flaws in Apple products?
But there has never ever been non-trivial software that has been completely free of such defects.
In other words (in my opinion), iOS is probably better than most other platforms against this type of attack.