Looking at the number of layer you shared, having a frame 4M does not seem to be logical.
I do not think it’s related because missing frame between 9k and 2M would show up somewhere and its not your case.
frame name in Figma will incrase according to the previous one.
For example if you create a new document and add a Frame it will be named Frame 1, but you can rename this frame by Frame 2387487234 and the next frame you will add to this file will be Frame 2387487235
Having 200k layers could make your file seems lagy through certain computer tho’. If this is the only file you and your team where experiencing slowlyness, I’d suggest to take a look at resource use from other files so you can compare and see where is your threshold and then break up your file into smaller one (if possible).
You can also try to record a session using chrome devtool and send it to Figma technical support
Figma Learn - Help Center