I have the same question.
According to
https://github.com/spesmilo/electrum/issues/8521the command to do this is
./run_electrum -o lightning_history
but I'm not sure how to do this using pre-compiled binaries (e.g. using electrum-4.x.x.exe in Windows) instead of using the source code.
How about in Python did you try this command?
If not try it first install a python in Windows and go to the Electrum directory or where it is installed and open CMD there and then use the command below. Replace the version of the electrum that you currently use.
electrum-4.5.2 -o lightning_history