How do I get the router name from the internal path?
Have a look at PathValidatorInterface::getUrlIfValid() or the version that does not check access. That is provided by the path.validator service:

\Drupal::service('path.validator')-&gt;getUrlIfValid('node/1')