Hi Amit,
Sorry, I don't understand perfectly the concerns.
What does mean "dynamic URL" in your context?
URL with same path (urlbase) but with different parameters or parameters values?
URL completely different from time to time?
Escaping URL is convenient for me, thanks to the JSAPI escapeUrl function. But you seem unhappy with the escapeUrl function, please may you give an example of bad behavior, perhaps some character set or special character involved?
Usually, it is up to customer to transform the parameters to use for the links of the template email containing parameters having special characters to encode.
If all the url including the parameters are provided by the SOAP call parameters (except the protocol http:// or https:// for tracking reasons), then you must escapeUrl all this parameter/URL. In that case please try this:
http://<%=escapeUrl(ctx.myURL)%>
But because you mention that escaping URL generates issue, probably for some special characters, the encoding is not valuable.
Regarding the point "You cannot have a parameter named ID conflicting with a parameter in the redirection URL", I didn't know such limitation because all my parameters are different from id parameter name, but I understand the reason.
If you can't manage a different parameter name ID for the rtEvent parameters, the only solution I see would be to modify the xtk.options (menu Administration/Platform/Options) NmsTracking_ClickFormula code, in order to allow this "feature". But it is a factory code, so it is not safe to modify/replace, and if you apply a build your change could be overwritten. So I recommend to create another option by duplicating NmsTracking_ClickFormula, then in your delivery Tracking properties, you replace the NmsTracking_ClickFormula by your customized one.
But I think it is too tricky anyway and risky, it is far easier to manage with the source SOAP calls to replace the ID parameter by myID name...
Regards
J-Serge