Unable to start screen sharing remotely on macOS Catalina after update

The problem was that, as of Mojave, you cannot stop/start the screen sharing daemon with kickstart unless "Screen sharing" is checked in System Preferences/Sharing. Probably the update just unchecked this preference for some reason, which made it impossible to restart the daemon remotely. Once I had physical access to the computer again and checked this preference everything worked as before the update.