My suggestions are just suggestions. As you say you have reasons for how they are encoded, and I gave suggestions and reason for mine. Your users can make suggestions and maybe you will implement or not.
On the dice encoding after the [] section,
Attachment 50102 are the 5e ruleset responses to the different types. By default neither of the '[] d6' or '[]d6' evaluate to a valid 'DMG: line'
Which is why I suggested and implemented in my extension the value been inside the '[]' section. To the ruleset this still parses with the default code.
ie, [2CHA6] would parse into '2 *' the lookup for 'CHA6' which would then fail to lookup due to the 'elseif sTag == "CHA" then' which would not map it and so would be correctly skipped due to the ruleset 'nil' check.
I dont know in what 'cases' these 'sometimes' work?
But as you say, how you want to encode the token structure is upto you on this. I can only make suggestions.
-pete