While there's no way for Roll20 to automatically modify a roll's formula based on another roll, the prebuilt 5th edition character sheets have a decent method of working around it that you could rework for 4e's purposes.
Basically, due to the Advantage/Disadvantage mechanics that anyone could have at any time (advantage is very similar to Oath of Enmity's effect for the 4e avenger), the 5e character sheet rolls 2d20 for every d20 roll, displaying them separately. As a simplified example, it does:
[[1d20 + (insert attack bonus math here)]] | [[1d20 + (insert attack bonus math here)]] vs AC.
When you actually hit the macro, this might come out in the chat log as something like:
11 | 16 vs AC
If you're in a situation where you're doing 2d20k1, you then use the better of the two results as the attack roll, otherwise you only pay attention to the first one.
For the damage macro in 4e, you could then do:
[[(insert standard damage formula here)]] damage. (Or [[(insert crit damage formula here)]] damage if a crit)
Which, when rolled, might turn into something like:
12 damage. (Or 32 damage if a crit)
You then just use whichever result applies to the attack roll you made.
This allows you to keep one macro for attack rolls regardless of whether or not you're hitting with Oath of Enmity, as well as one macro for damage rolls (per ability), though the tradeoff is slightly more clutter on each roll that might not be applicable to the specific situation you're in.
Note: The above macro examples are not /roll commands; the double square brackets cause the contents to be inline rolls that automatically merge all the dice rolling and math into just the final result (you can mouse over them when rolled to see the dice results and formula within). As such, my examples go straight into the chat. You can precede them with /em if you wish for them to be displayed in the emote style instead.
As a more concrete example, lets use your example of +10 to hit, your attack for this macro does 1d12 + 8, and your weapon does an extra 1d6 on a crit.
You'd have an attack macro of:
[[1d20+10]] | [[1d20+10]] vs AC.
And a damage macro of:
[[1d12+8]] damage. (Or [[20+1d6]] damage if a crit)
Rolling both macros in turn might give you the results of:
12 | 30 vs AC.
10 damage. (Or 23 damage if a crit)
If you had Oath active and working for the attack, you'd take the 30 vs AC. The 30 is also a nat 20; this would be indicated within chat by a green outline surrounding the 30 result, which indicates that at least one of the inlined dice results was a max value roll (and you could hover over the 30 to see that the d20's result was a 20).
Since you nat 20'd, you'd also use the 23 damage result instead of the 10.
However, if Oath wasn't active, you'd only pay attention to the result of 12, and if that was somehow a hit, you'd hit for only 10 damage.