I'm not sure of your design when you say then you plan to use sling:vanityPath via page properties. Using this approach you can configure a vanity on a target page url. You'd still need to find a solution for appending your query string which can be done using additional redirect or post-processors. per your use case of one-to-one or one-to-many relationship.
You could still create sling mappings per vanity per page via /crx/de.
Another solution would be to create a redirect rules file in AEM via code, push it to apache via job and let mod_rewrite pick it and use it dynamically. Think through all pros/cons for this solution based on your setup.
The above solutions assume that your requirement is not related to analytics tracking as I mentioned above.
There are multiple solutions to achieve this. It depends on your requirements e.g:
How many vanities would you have?
How many params/Ids would you have?
What is the relationship between vanity vs IDs vs target urls?
I'm not sure if you are trying to marry this server-side solution with utm params or adwords campaigns or analytics use case?
The easiest non-authorable solution is to use "sling mappings". If you want to include author functionality then you could use either sling mappings or page properties/sling:vanityPath or apache redirects or custom json with key/value pairs and perform your use case.