Some things I'd like to add/mention/correct:
The playerdata folder is only used on servers. There doesn't seem to be a need to modify it for a single player world.
The files in the advancements and stats folders must be remaimed for advancements and stats to carry over.
Pets don't seem to remember you, it seems you will have to edit the NBT data for objects separate from the player if you want to fully move accounts.
Full report:
I looked up the level.dat format on the wiki, and it didn't seem to contain any name/id data, so I decided to see if it would just automatically let me use my old data. I loaded up my installation, and it worked fine. My settings were as I left them.
I started by going into my older hardcore world to see if it would keep me in spectator mode and it did, so it seemed at least some of the player data carries over.
I then went into another world. I still had my inventory and exp, but my achievements were bugged. This was a simple fix. I just renamed the file in the achievements folder as I had intended to do with the playerdata folder.
Finally, I went into my current hardcore world. I noticed that I didn't have my recipes and I couldn't use the dog, but everything that had worked was already enough for me.
See https://minecraft.fandom.com/wiki/Player.dat_format#NBT_Structurehttps://minecraft.wiki/w/Player.dat_format#NBT_Structure