Creating a RAM Disk for Firefox and Chrome profile folders

I'd like to create a RAM Disk of about 500 MB, and copy my Firefox and Chrome profile folders (located in my bootable SSD) with a batch script run at every Windows startup, in order to speed up navigation. However this is not easy:

1. I need to make a PERFECT COPY of my profile folders (all the files, folders and subfolders, but also all file attributes, permissions, R/W, hidden files, system files, etc.).
What would be the right batch command with all the right flags? I have looked into XCOPY and ROBOCOPY, but I'm not an expert : which one is really able to make a PERFECT COPY of a folder and its subfolders and files (even hidden ones, etc.), using the right flags? Or is there a better solution?
FYI I have come up with this command line: XCOPY C:\Users\Jose\AppData\Roaming\Mozilla\Firefox\Profiles\kz5u35az.default\ S:\Firefox\Profiles\kz5u35az.default\ /I /E /K /Q /H /X
But I don't know if it will make a perfect copy or if I can do better. I'm no expert at this, I don't even know the difference between XCOPY and ROBOCOPY, so...

2. Let's call Folder 1 the original profile folder in my SSD, and Folder 2 the perfect copy on the RAM Disk. Folder 2 would need to be periodically saved to my SSD (every 5 min or so), so any changes made during my navigation (new tabs, new extensions, new bookmarks...) could be remembered. Is that the right strategy? How would you proceed? Wouldn't it be bad for the SSD to save hundreds of MB so frequently? Unless RAM Disk handles incremental backups of course. How does it work exactly?

3. How could I prevent the risk of file corruption in my RAM Drive? I can't afford the RAM Drive to corrupt my data in Folder 2 AND at the next backup (5 min max) to save the corrupted data into Folder 1. Again, how would you proceed?

I personally wouldn't place the pagefile on a RAM Disk. Here's an article why it's not a good idea.

I also don't see the point in saving caches. They can be wiped on reboot and will be re-created next time you start your browser.

Regarding profiles, there's usually little writing in them (e.g. just writing a small bunch of bytes when you go to a new URL or open a tab), so again I wouldn't store it in a RAM Disk. In addition, an extra later is likely to increase the chance to end up with a corrupted profile.

Having said this, you can do what you described above, but I think there would be little or no gain. I personally only move browser caches and Windows temporary folder to a volatile RAM Disk. This way all temporary stuff can be accessed quickly and disappears upon reboot.

Placing the pagefile on a RAM Disk is a good idea, because some of the premises on that article (that I've already read months ago) are simply false. Because all Microsoft systems don't work exactly the way they're supposed to, unfortunately. I won't be the first nor the last to place my pagefile on a RAM Disk.

The point in saving caches is having faster navigation after a reboot, if you often visit the same sites.

Regarding the profiles, honestly I don't know. It's true that it seems a lot of hassle for little benefit. That being said, why would have Raymond made such an article then ? I don't know.

I want to extend my SSD's life so I redirect all my TEMP and TMP variable locations to the RAM disk (although I have 32GB RAM so...). I also redirect my swapfile to my RAM disk. This may sound counter intuitive, but the simple fact is that some programs, including Windows uses the swapfile from time to time. It's better to have the OS hitting the RAM disk than your SSD or regular hard drive, even if the impact is minimal.

As for redirecting browser profiles and temp locations, there are many sources online that talks about this. The Great Google is your friend.