The current implementation of monero's tech is less advanced than zcash, but stealth addresses are as secure as ECC gets. The idea comes from ECDH.
The weakness in monero's cryptography is dependence on ring signatures, which will be improved with the FCMP++ upgrade. In other words, it is an issue of sender privacy. Stealth addresses protect recipient privacy.