Need help with permalink rewrites for Custom Post Types with hierarchical relationships

I think it is better to connect with taxonomy terms. Since you can add any custom fields to terms using ACF / another plugin / code, it is possible to use terms with images, full description etc.

I had similar task, this tutorial should be helpful https://rudrastyh.com/wordpress/taxonomy-slug-in-post-type-url.html. Yes, I know that there is no hierarchy but I want to show you another principle to implement your task.

Actually to add an hierarchy you just have to reorder terms from this part of the code:

$terms = wp_get_object_terms( $post->ID, $tax_name );

And add them in this part:

$permalink = str_replace( $post_type_slug, $terms[0]->slug . "https://wordpress.stackexchange.com/" . $terms[0]->slug, $permalink );

If you have a specific quetion – ask in comments – here or there as you want. I will try to help you.