Great question @Anton Lagerholm ,
You will need to adapt your code to update the device OTA. Can you share some examples of ways you would expect it to be done without needing to customize the code?
See also this example: Tutorial: Implement a device firmware update process
It gives you an idea on how it is done using device twin desired properties
and device twin reported properties
Thank you!