Based on what you’ve written as the intended rewrite results, the method you’ve got (one rewrite for each case) should be the best way to go about it.
One rewrite alone probably won’t be suitable, since rewrite * /{host}{uri} will produce https://example.com/example.com/ (with a trailing slash) for the first case (a request to the web root), when you’ve said that you want https://example.com/example.com (no trailing slash).
Is there any specific problem with the way you’ve said you’re doing it right now? It looks alright to me at a glance (assuming it’s formulated properly in the Caddyfile itself, i.e. without the spacing between / and your (star)).