OK, I think I've come up with a solution to Option A.
As mentioned, Base64 includes 3 characters that are NOT valid in element IDs: '+', '' and '=' and we have only two available characters to use to replace them: '-' and '_'.
However, the '=' only appears on the END of the encoding, as padding characters to even the bit count.