As pointed out by @B-Galati and following comments here, the Symfony Messenger could have multiple synchronous handlers for the same message. If multiple handlers fail in this case, the resulting single HandlerFailedException would wrap all the raised exceptions.
To fix this, we probably have to iterate over $error->getNestedExceptions() and capture them all.