Is it possible to have hierarchical taxonomy and hierarchical custom post types in one permalink?

To cut a long story short the answer to the question is Yes.

In the end I was able to create:
tax-1/tax-2/cpt-1/cpt-1-post/cpt-2/cpt-2-post/

and another structure:
tax-1/tax-2/cpt-1/cpt-1-post/cpt-2/custom-field/cpt-2-post/

I used Types from http://wp-types.com/ to create the hierarchical custom taxonomy, the custom post types, custom fields, but most importantly the parent/child relationship between custom post types. That plugin saved a lot of time.

The next step was to do the URL re-writes using regular expressions.

    <?php


    // Add custom rewrite rules

    add_filter( 'rewrite_rules_array','my_insert_rewrite_rules' );

    // Add custom variable for WP_QUERY

    add_filter( 'query_vars','my_insert_query_vars' );

    // This hook is fired once WP, all plugins, and the theme are fully loaded and instantiated.

    add_action( 'wp_loaded','my_flush_rules' );

    // Flush rules for include custom rewrite rules

    function my_flush_rules(){
        $rules = get_option( 'rewrite_rules' );
        global $wp_rewrite;
        $wp_rewrite->flush_rules();
    }

    // Add custom rewrite rules

    function my_insert_rewrite_rules( $rules ){
        $newrules = array();  

        $location_list = get_terms("location",array("parent" => 0, "hide_empty" => 0));
        foreach($location_list as $location){
            $base_url = sprintf('index.php?taxonomy=%s&term=%s&child_term=$matches[1]&type=$matches[2]&type_title=$matches[3]&media_type=$matches[4]&media_maintitle=$matches[5]&media_title=$matches[6]','location',$location->slug);
            $newrules[$location->slug.'/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/?'] = $base_url;
            $base_url = sprintf('index.php?taxonomy=%s&term=%s&child_term=$matches[1]&type=$matches[2]&type_title=$matches[3]&media_type=$matches[4]&media_title=$matches[5]','location',$location->slug);        
            $newrules[$location->slug.'/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/?'] = $base_url;
            $base_url = sprintf('index.php?taxonomy=%s&term=%s&child_term=$matches[1]&type=$matches[2]&type_title=$matches[3]&media_type=$matches[4]','location',$location->slug);        
            $newrules[$location->slug.'/([^/]+)/([^/]+)/([^/]+)/([^/]+)/?'] = $base_url;
            $base_url = sprintf('index.php?taxonomy=%s&term=%s&child_term=$matches[1]&type=$matches[2]&type_title=$matches[3]','location',$location->slug);        
            $newrules[$location->slug.'/([^/]+)/([^/]+)/([^/]+)/?'] = $base_url;
            $base_url = sprintf('index.php?taxonomy=%s&term=%s&child_term=$matches[1]&type=$matches[2]','location',$location->slug);        
            $newrules[$location->slug.'/([^/]+)/([^/]+)/?'] = $base_url;
            $base_url = sprintf('index.php?taxonomy=%s&term=%s&child_term=$matches[1]','location',$location->slug);        
            $newrules[$location->slug.'/([^/]+)/?'] = $base_url;
        }

        return $newrules + $rules;
    }

    // Add custom variable for WP_QUERY

    function my_insert_query_vars( $vars ){                                                                                               
        array_push($vars, 'taxonomy');          
        array_push($vars, 'child_term');                   
        array_push($vars, 'type');                       
        array_push($vars, 'type_title');                           
        array_push($vars, 'media_type');                                
        array_push($vars, 'media_maintitle');                    
        array_push($vars, 'media_title'); 
        return $vars;
    }

    ?>

I’m not sure if the optimum REGEX rules have been created here, but I found I had to do this much to make sure re-directs were in place ensuring no potential for multiple URLs displaying the same content.

There is more to the answer than I’ve posted here, but I think there is a limit to the number of lines I can post.