Trying to get a bit-to-bit equivalent of a binary lifted from the app store sounds challenging to say the least.
See also Guix, which provides tools to challenge servers providing binary packages to see if they match a locally-built version: https://guix.gnu.org/manual/en/html_node/Invoking-guix-chall...