Well, I detached to elements, not to individual objects. I didn't do an uvmap , but the detach thing would allow you to have the tooth only a few times on the uvmap, and copy it on the mesh. In the first example, you would split as you did usually. The example with the chamfer need a lot less uvsplit.
Yesss, this is clear. This is why I would rather chamfer, even if it need some extra triangles. This is why I highly recommend it. Not just here, every time when the other solution would cause such uvmap. Make the rail as one element, chamfer the edges, uv it as you want. Problem solved :D