Glue the End Caps First
Cut the end cap so the bottom portion and the very top are close enough to be cleaned up with a file. The rest will be trimmed with a router. Cut the end cap to size with snips, then paint a thin layer of glue on both surfaces. Let the glue dry just until it's no longer wet to the touch, then carefully line up the top and ends and tip the piece into place. Embed the end cap by lightly tapping the whole surface with a smooth, burr-free hammer, and then it's ready for the router.