For district heating, sure. For electricity? Yes, in theory, but not at efficiencies that would make financial sense.
> when the way you store the energy is expensive
batteries are cheap
> batteries are cheap
a metal box for storing synthetic fuel is cheaper