Hello,
I do not think this is possible from the routing perspective, as there is no way to set how set and to decide whether to route from 10.0.0.0/8 to 10.0.0.0/24 site via some networking interface.
Why do you need such large networks in the first place?
It can cause other issues such as broadcast floods, which waste bandwidth and reduce overall performance.
Best regards,