You seem to have the commands reversed.
First try to intervene then target a friend.
This would only work if your target is friendly to begin with.
You probably meant something like this?
Code:
#showtooltip
/cast [nomod] Sturmangriff
/cast [nomod] Siegesrausch
/targetfriend [mod:alt,harm]
/cast [mod:alt] Einschreiten
/targetlastenemy [mod:alt,noharm]
The harm/noharm parameters I added so it would only switch to friendly target if it didn't have one already,
conversely it will only target last enemy if you had a friendly target (after intervene)