Glad to here you resolved your issue. As it turns out what I mentioned earlier is no longer an issue as Electrum does not require
Apt-Pinning when installing.
If increasing RAM and cpu cores fixed the issue then the it was it was not enough RAM/cores allocated.
You should not be using anything other than TBB with Whonix. Reasons:
You can have unexpected results if you use Firefox instead of TBB. This thread gives an example: