You really don’t have that kind of flexibility in Caddy v1. You can get really, disgustingly hacky with rewrites as conditionals, prepending arbitrary path prefixes and then proxying to get rid of them again. You can abuse entire site blocks as a kind of v2 route analogue this way.
That said, it’s still nearly impossible to stack conditionals that otherwise can’t be stacked in a single directive in Caddy v1; you can only ever do one rewrite per request per site block. If you rewrite first to check that the file exists, you lose the ability to rewrite to prepend the arbitrary prefix. If you rewrite to prepend the prefix, you’re not checking whether the file actually exists or not, because rewriting is the mechanism for practically checking file existence in v1.
I gave up after a few minutes. I’d hesitate to rule out the possibility of another old Caddy v1 veteran to upstage my rewrite hacks here and come out with a working config, but that’s a pretty small list. v1 just isn’t as powerful or flexible as v2.
My recommendation is to use Caddy v2 as your upstream server, with this logic applied, and then simply reverse proxy to it from Caddy v1 with reauth if that’s your requirement.