Bulk Import of Membership Dues
It sounds like your process of importing memberships via CSV and contributions via CSV works - except that your contributions and memberships aren't linked.

If that's correct, I've resolved this when doing migrations as follows:


Create a custom field for contributions called "external serial" or similar.
Create a custom field for memberships also called "external serial".
Add a serial number column to your CSV (if one doesn't already exist) before importing it as contributions/memberships.  The only important part is that each row have a unique identifier.
After import, you can use the shared identifier to create a new CSV with just two columns - membership_id and contribution_id (as CiviCRM assigned them).  I typically would do this via SQL.  Something like this:

SELECT cc.id AS contribution_id, cm.id AS membership_id
FROM civicrm_contribution cc 
JOIN civicrm_value_importfieldcc_1 cvi1 ON cc.id = cvi1.entity_id
JOIN civicrm_value_importfieldcm_2 cvi2 ON cvi1.external_serial_1 = cvi2.external_serial_2
JOIN civicrm_membership cm ON cvi2.entity_id = cm.id

Create membership payments using this new CSV to link the memberships/contributions.  You can do that with the API CSV Import GUI extension or the command-line tool that ships with CiviCRM.