The title sentence could be rendered in two ways: the one above, or
Does a (optionally) parenthesised word...
This might be more appropriate since the "optionally" has a kind of “removable” function like a footnote, and
Does an parenthesised word...
is clearly wrong.
Yet reading "Does a (optionally)..." feels weird too.
reading the (also parenthesis-containing) sentence
aloud, should one pronounce the "the" as ðə or as ðiː?
Does an (parenthesised) optional word...
reading the (parenthesis-containing) example?