In principle heat can be converted to work if there are two bodies at different temperature. In space heat can only be irradiated away since there’s no matter available for conduction, so I would think that eventually all of your machinery would thermalize with the environment and the boundary conditions. While there should be a temperature gradient between the side exposed to the sun and the one opposite to it, I’m not sure how much of this is actually harvestable.