I don’t think this is the case because the redirects aren’t to pages that don’t exist. The redirects are to pages that DO exist. The problem is the system is creating ghost pages for the links that don’t exist at the parent level if you are doing a redirect from a child that doesn’t exist.
It’s sort of an odd bug, because technically the redirect is for pages that don’t exist, why create structure for them.
I think the way you are explaining it you have it backwards. Also, the way your system is designed /api-reference/foo would automatically be made to exist if it had a child that exists, it would list its child page if not fleshed out by the user and it would use the nice formatting you have set up. I can create an example to show that too if necessary.
I did arrive at the same final conclusion though - which is you need to create an extra redirect.