Help with linking placeholders

Yes, you can avoid any kind of workarounds like this by making use of Replacements. A key thing to note is that Replacements run more than once. They run fairly early on so that you can create complex placeholders (as explored in the linked howto), but they also run a bit later on, so that we can do stuff to any text generated by placeholders.

Therefore we need to create a number that looks unique based on the text around it, and then delete any numbers that match that pattern, leaving the other numbers in place. For example, this would go into the title suffix:

~~<$n:chapter:<$title_no_spaces>>

Upon compiling, that would result in, “1. First Chapter~~1”. Now we have a unique looking number that we can be sure to destroy. And regular expressions will help us make a statement such as “any digit following two tildes”—something otherwise difficult with typical search and replace matching.

In the Format’s Replacements pane, add a RegEx replacement for ~~\d+ and replace it with nothing. Or copy and paste the following into the replacements table:

Replacement
<Replacements>
<Replacement RegEx="Yes">
    <Replace><![CDATA[~~\d+]]></Replace>
    <With><![CDATA[]]></With>
</Replacement>
</Replacements>