Easier way would be to use a $_GET parameter (which don’t change the autogenerated canonical address wordpress uses) and the content_pagination filter like this:
add_filter( 'content_pagination', function($pages){
if ( in_the_loop() && (isset($_GET['onepage']) ){
$pages = [ join( '', $pages ) ];
}
return $pages;
} );
Happy Coding.