Some brute CLI solutions:
Generate commands for moving all privkeys to another electrum wallet:
echo walletpassword | python electrum dumpprivkeys 2>/dev/null | grep -v WARNING | grep -v Exposing | grep -v "In particular" | grep \" |cut -d "\"" -f2 | xargs -L 1 echo python electrum importprivkey
Generate code for inserting all electrum wallet privkeys to bitcoind:
echo walletpassword | python electrum dumpprivkeys 2>/dev/null | grep -v WARNING | grep -v Exposing | grep -v "In particular" | grep \" |cut -d "\"" -f2 | xargs -L 1 echo bitcoin-cli importprivkey | awk '{print false $0" false &&"}' | xargs | sed 's/.\{2\}$//'
Run commands from the electrum directory, and when done, simply copy the output and paste it in another terminal window. Please ensure, you're sitting in the relevant directory for electrum