Isn't "Pegasus" transmitted via a well-crafted iMessage ? If only there was a central choke-point, globally, for all iMessage messages that could weed out particularly ill-formed messages such that they never reach your phone ... If only ...
Because of E2EE that choke point is necessarily the software update process.
Wouldn't a simple block/allow list for sending IDs / phone numbers be trivial to implement on the iCloud (or whatever) side of things such that the end user could allow their known contacts and block (everyone else) ?
Forgive me - I am not an iMessage user ...