If you want to omporting data in Mendix DB, you always need to go through the Mendix Runtime. Indeed as you notice you don't have access to the database in the Mendix Cloud. Mendix choose this construction for a couple of reasons and the main one is security, but also the database structure sync what the Mendix Runtime executes based on your domain model.
The best practice I use the most of the time, depending how large the data is. Is to make a branch-line where I build the migration logic and removes possible indexes. First you dpleoy the branch-line and executes the migration and after that the original app of the main-line.
And it is always good to do a local migration first. This way it is easier to see which commands are issued on the database during the migration. Anlyzing these can help in creating and adapting the migration logic.
[EDIT] I think that this part of the documentation answers your question: https://docs.mendix.com/tips/migrating-your-mendix-database