url rewriting – How to add custom rewrite rules and point to specific templates

How can I add a custom rewrite rule so I can catch paths like these:

/products/imports/filters
/products/imports/elements
/products/imports/parts

And point them to a template file, for examples:

sector.php

My code:

function sector_rewrite_rule() {
    add_rewrite_rule(
        '(.?.+?)/((^/)*)/((^/)*)/?$',
        'index.php?pagename=$matches(1)/$matches(2)&sector=$matches(3)',
        'top'
    );
}
add_action('init', 'sector_rewrite_rule', 10, 0);

But I get 404 when I tried with the URLs above.

I have a standard page called import created under products already:

products/
   imports/

So I want to catch any word right after this page:

/products/imports/