In addition to my previously reported problems with having periods in the ID, simply using a function to escape the periods and colons is not a complete solution.
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.