Target of Target, with a shift mod help?

Does anyone know if its possible make a macro that will cast Penance on a target, and will cast Penance on shift mod to the target of target?

#showtooltip
/cast [mod:shift,@targettarget][]penance

The empty brackets [ ] between the “[mod:shift,@targettarget]” and “penance” means “cast normally” and if mod:shift isn’t held down, it will just cast penance at your target.

Shift 1 to 6 is keybound by default to Action bar switching and if this macro is on buttons 1-6 the keybinding will “eat” the shift first and prevent the macro from working properly, unless you unbind Shift 1-6 first.

Also see wowpedia for more info on macros
https://wowpedia.fandom.com/wiki/Macro_commands
https://wowpedia.fandom.com/wiki/Macro_conditionals
And the page that discusses target of target “aiming”
https://wowpedia.fandom.com/wiki/UnitId