seem like this would be readily adaptable. Kind of mixed opinions since they wrote the primary tool by hand but slopped together the proxmox supporting bits, not feeling particularly confident in critically assessing the output of the machine that lies, even though I could certainly spin this up faster than writing my own.
https://github.com/imthekaiser/ZFS_crypto_unlock/tree/main