It's theoretically possible, but not easy. It requires replacing multiple classes in both the javascript and PHP code and I don't think there is any example or guidance available to help with the task.
The components that are related to this feature are at minimum the Mithril routes, the discussion route builder javascript function, the javascript route observer for infinite scroll, the javascript URL update code in the scroll handler for the discussion page, the PHP routes and the PHP URL generator.
The Mithril router will gracefully fallback to query string parameters if the route doesn't have a parameter with that name, so naming the query string parameter number
might reduce the difficulty slightly. But the server-side URL generator doesn't support that feature, so you would have to override it completely to allow canonical links and URLs in emails to be built with a query string.