Get Category Product relation table name dynamically Magento 2.

You can get the category product table name dynamically using Magento 2 Catalog module.

catalog_category_product table used for category-product relation.

The table contains entity_id, category_id, product_id and position field to manage relationships with products.

A class responsible to get the category table name is Magento\Catalog\Model\ResourceModel\Category.

call from template or other class,
echo $categoryProductTable = $this->getCategoryProductTable();

Output:
catalog_category_product (if prefix available, output is with prefix tablename)