I have no idea how TREZOR is actually designed, but I would assume they could avoid this kind of security issue by using a secure element/smart card to perform the cryptographic operations.
AFAIK Trezor implements crypto in software running on a general-purpose ARM microcontroller. I don't know if there are any secure chips that support Bitcoin-compatible ECC.