Migrate Multisite Subdomain to subdirectory.

I have tried to migrate the installation into a subdirectory, but it failed. The reason is, that I want to run other applications under the same domain-name, under which the main-site of this WPMU is currently running.
I have applied a guide, but probably it was only for single sites:

1. Create the subdirectory /wordpress
2. Move all fiels except for “config.php” and “.htaccess” to /wordpress
3. Copy (not move) index.php back to previous wp-root-directory
4. Open index.php and add the subdirectory to turn
“require( dirname( __FILE__ ) . ‘/wp-blog-header.php’ );”
“require( dirname( __FILE__ ) . ‘/wordpress/wp-blog-header.php’ );”
5. Log into dashboard and install “Better Search replace” plugin
6. Replace “https://domain.com/wp-content” with “https://domain.com/wordpress/wp-content”

Then I tried to log in order to save permalink slugs again, but the 404 error got displayed. Any idea what went wrong? Please check and help.