One way of approaching it is with a handful of smart groups:
Lets assume you create compliance officers as individuals and link them with a 'Compliance officer is/of' relationship
1) Create a smart group of 'Compliance officers of member orgs' by using Advanced Search to search for organisations that have a current membership and setting 'Display Results as' to 'Related contacts' and the relationship as 'Compliance officer of' - this is the first group to add to your mailing.
2) Create a smart group of 'Member Orgs'
3) Create a smart group of 'Member orgs with compliance officers' by searching for members with a 'compliance officer is' relationship
4) Create a smart group for 'Member orgs without compliance officers' using Search > Custom Search > Include/Exclude search and the last two groups you just created
5) Create a smart group of 'Main contacts of member orgs without compliance officers' similar to 1) using 'Member orgs without compliance officers' and Related contacts/Main contact of - This is the second group to add to your mailing.
Use too many layers of smart groups and your server will be gasping for air, but it might work if your numbers are not too large.