HW wallet doesn't need to understand the contract logic, it just needs ABI, which is generally a simpler task. Also it can show the name of function you're calling as selector is a hash of a name.
Safe is a bit more complex as it also wraps it in EIP-712 message, but that can also be decoded in a systematic way.
I have very limited knowledge about EVM, but those computations are bounded by gas, right? Evaluating them is a finite process.
Ie. engineering work needs to happen in the UI they used to confirm the tx
You'd think they could at least show a blockie representing the contract, or reputational party who cryptographically vouched for it.
But there are better options with larger screens, which actually display contract parameters on the secure device.