Now the question: In the first case, you disable the exchange-online mailbox and migrate the onprem. Is in this case a "new" mailbox created which a new guid in exo or is the old, cloud-only, mailbox overriden with the data from onprem? Is it possible to recover the data previously stored in the old mailbox or is it gone?
The data in the old mailbox is gone in this case.
If you choose to disable the exchange online mailbox and then migrate the onprem, you would need to clean up the Exchange Online objects in advance to proceed, so all the content in the mailbox would be deleted as well. See Permanently Clear Previous Mailbox Info.
If you insist using this method to deal with the 2-mailboxes situation stated at the beginning, I'd suggest exporting the data from the old cloud mailbox to PST file up front, and then import it after the migration is completed.
However, the recommended method is the second case as you mentioned above, that is to disable the on-prem mailbox and keep the Exchange Online one. The contents of the disconnected on-prem mailbox could be restored to the Exchange Online mailbox. For detailed instructions, hopefully you can find the link below helpful:
How to recover when a mailbox exists in both Exchange Online and on-premises
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.