Matth I have set the USB-C port settings to "Charging-only when locked, except before first unlock". I'm not sure if I understand it correctly, but I expect that the phone will only charge when it is locked, but not charge, when it is unlocked. And, it will NOT charge before the first-unlock, i.e. the first time I enter the password after a reboot.
The USB-C port control option is for security purposes. It does not limit charging, because charging is believed safe. It limits data communication, because data communication exposes attack surface, e.g., possible vulnerabilities in the USB-C driver, the keyboard and mouse driver, the storage driver, the Ethernet driver, etc.
"Charging-only when locked, except before first unlock" means:
- Before first unlock (when less software is running and thus less software is exposed, and all private data is at rest), USB-C device data connections are allowed (this allows unlocking a device with a USB keyboard if the touch sensor is broken),
- When the device is unlocked, USB-C device data connections are allowed,
- When the device is locked after first unlock, if data connections are in progress they remain active until everything is unplugged, and then the port is switched to charging-only.