What's the best way to import memberships and their associated contributions?
This is doable using the API, and I've accomplished it using Pentaho Kettle.  It has a CiviCRM Input and CiviCRM Output step, which use the REST API.  You're right to be concerned about the SQL-based approach, since there's been discussion of deprecating that table in favor of a line item-based approach to connecting contributions and memberships.

If you use Kettle, you can see my example code here: https://github.com/PalanteJon/aceware_civicrm_kettle/

If you decide to go with the CSV CLI tool, you'll run into trouble, because your output won't contain the ID of the created memberships and payments to create the MembershipPayment record.  So you can either a) use API chaining, or b) do what I did in Kettle, parse the JSON that the API outputs and use that to create your MembershipPayment record.