Unifi and Pihole - upstream DNS question

Answers would depend on your router's behaviour, your planned network usage and additional Pi-hole configuration options.

Resolution speed usually isn't an issue, but you'd want to avoid DNS loops, i.e. feeding some or all of Pi-hole's DNS requests to an upstream that in turn feeds them back to Pi-hole.

In that regard, you should be aware that some routers may forcefully redirect DNS requests, either to their own IP, to their configured upstream or to a public DNS server of their choice.
Some routers may expose respective configuration options to excercise some control over that behaviour (or they may not).

With regard to the router's upstream, you should note that setting that to Pi-hole will potentially close a partial DNS loop when Pi-hole's Conditional Forwarding is enabled.
On the other hand, if you set the router's upstream to a public DNS server, that would mean that your router's own DNS requests by-pass Pi-hole, and it could also mean that some of your network may by-pass Pi-hole (but depending on your personal preferences, that perhaps may be a desired behaviour), e.g. some routers may offer a guest network that strictly uses the router in combination with the router's upstream for DNS.

Provided your router does not apply forceful DNS redirection under the hood, only your 4.) would avoid DNS loops, with the potential drawback of not filtering any DNS requests accumulated by your router (e.g. your guest network).

If you'd be determined to filter your router's upstream as well, you should try to short-circuit potential loops by creating the corresponding router-specific blocking rules (see e.g. Dnsmasq[1035]: Maximum number of concurrent DNS queries reached (max: 150) - #2 by Bucking_Horn for a sample set of rules for a FritzBox model router).