> And a small issue on top of that: If you define /route, /route/ will still throw a 404. The right solution would be to serve the page on the two routes but set one as canonical source. But you have to do that manually.
In most cases you can get away with wholesale removing and redirecting all trailing slashes in middleware.