Any idea if this is possible?
Sure it is possible, the same way Pier puts the automatic hash value there.
You could easily patch Pier to link to the specified sections. However
the link names have to follow a specific syntax (given in the HTML
standard) and the name has to be unique too.