git-filter-repo is amazing for the second case. I've used it to split repos and rename folders multiple times.
Yeah, I wrote a TIL about that a few years ago: https://til.simonwillison.net/git/rewrite-repo-specific-file...
Yeah, I wrote a TIL about that a few years ago: https://til.simonwillison.net/git/rewrite-repo-specific-file...