To summarize your 2 screenshots:
You have 5194 transactions, many dust transactions in and out, 99387 private keys, and a total balance around 7 Bitcoin. With that balance, I would continue working offline!
I'm curious: how did you get to this point? I see many dust transactions from last year.
Run Electrum offline, remove the password (leave "New Password" blank) and open the wallet file as text.
The keys should be listed there under "keystore", import them by batch per wallet this time.
All the more reason to do this offline. And start by making another backup of your wallet file before doing this.
After exporting the keys, I'd import them all into Bitcoin Core. You should be able to do that from the command prompt, and when done let Bitcoin Core update it's wallet. From what I've read, it should be able to handle that many keys without problems.
You may want to read my topic on
consolidating small inputs to save on transaction fees.