Bump, hoping for suggestions.
I tried it and also ran into problems. For me, first thing I noticed was it wouldn't trigger on message received from specified contact. So, I changed that to trigger on any notification from messages app with text that included the name of a specified contact. That seemed to work as a trigger, but even though the routine would switch from vibration to sound, I didn't hear beep and the routine didn't result in switching back to vibration. I then ditched the beep and the waits, and instead just set it to display a custom notification as a test action. That seemed to work, and to also permit the routine to complete to the end to switch back to vibration. At one point, I replaced the custom notification with an action to turn the flashlight on, wait 5 seconds, turn flashlight off, and that seemed to stop/fail for turning the flashlight off or the wait. So, I ditched the wait again and it seemed to then work to basically "flash the flashlight" when the specified contact messaged me, while also completing to the end of the routine to switch back to vibration. I also re-tried some beeps as actions at one point, but for me that didn't seem to work and I don't remember if I was re-trying with or without waits (and to be honest I started getting more interested in just confirming that some of the logic could work as opposed to which specific logic would or wouldn't, so I didn't dig deeply back into the beep).
My guess is certain things don't always fully work in routines for some of the triggers and actions, or in certain combinations/scenarios. I have previously noticed that certain things are sometimes not available for selection depending on what other things are selected in a routine. And, to me some of how the Ifs/ElseIfs are available don't seem to follow natural expectations.
I think when something fails in a routine, in some cases it might now just stop and exit the routine without trying any of the remaining steps. Previous, I have seen routines provide indication of errors or failures, but maybe they don't do that anymore (I didn't receive any error or failure indicators when trying things and had to basically rely on my own artificially inserted indicators and from my own observations, to try to determine where things might be getting hung up. The failures of the waits (if that is part of what is happening) seem particularly odd to me because I'm pretty sure I've played around with those successfully before.
I suggest you try lots of trial and error to see what you might be able to get working for your need via routines. Or, also reconsider use of do not disturb and for notifications from favourite contacts to punch through the do not disturb.