But the TNP problem is described at the page Topological_naming_problem page by this example right? At the solution page https://wiki.freecadweb.org/TNP_solution there is also description added. If you read it you will find out this is THE solution. Because the script is the only sample implementation of the solution.
The solution is simple and it is described at the page for everyone: "Store the key before any operation". The key may be different. If I make Chamfer at Cubes I store key for edges. But the main rule is the same. Implementation not change anything here.
Well if you have Sketch you should go to Sketch developers and tell them to store key before Sketch open. This can be implemented at many ways. Even using personal local settings files. So well. If you have issue with Pad you should ask PartDesign developers to store the key.