Problem
Edit module uses a custom made-up way to upcast URL arguments from the request. Drupal core got standard upcasting features in the meantime in #1798214: Upcast request arguments/attributes to full objects, so edit should use that.
Proposal
Slightly extend the core upcasting feature, so it can take an entity type and an entity as separate variables and upcast from there.