Just for clarification - you use the term redirected here (which has a very specific meaning), but further down you use proxy. Do you want:
Someone browsing to example.com on HTTP(S) to be redirected to your server on port 8080, or;
Someone browsing to your server on port 8080 to be redirected to https://example.com, or;
Someone browsing to example.com on HTTP(S) to be served content from your server on port 8080?
Your provided Caddyfile example would indeed suit option 3. There aren’t any syntactic problems with it that I can see.
You can fix file descriptor warnings by using the command given in the error string (ulimit -n 8192). This is temporary to the shell you’re using, but when Caddy is being run from that shell it will inherit the new limit.