sharepoint online – Working with large amounts of folders

I’m in SharePoint Online, where I have to copy data from one list to another. My code already works on low amount of folders, but I have problems with large amount of folders.

Example:
LibraryA: Contains 50,000+ folders structured like:

- Folder "ABCOEQ":
--- CONTENT
- Folder "BCOEQW":
--- CONTENT

I have operations that work on these folders such as:

private static void CopyToDestination(ClientContext context, FolderCollection folders)
private static void CreateFolder(ClientContext context, string listName, string folderName)
private static Folder GetFolderByName(FolderCollection folders, string folderName)

When loading folders inside a RootFolder of a List I receive an exception that the list is too large. My whole program gets stuck on:

List sourceList = web.Lists.GetByTitle(SOURCE_LIST_NAME);
FolderCollection folders = sourceList.RootFolder.Folders;

After loading them I refer to them like that:

foreach (Folder folder in folders)
{
       FolderCollection subfolders = folder.Folders;
       // Logic to manipulate files and folders inside
}

How can I get FolderCollection that takes all of the folders or read it by batches of for example 500 folders?