I'm not sure, but it sounds like it might be that you're defining the trigger in the profile you want to switch _to_, rather than _from_. But the 'auto profile switch' rule goes into the profile to switch _to_.
So whatever default profile you use when opening a new session, ensure the trigger is defined there. You could test that part is working by changing the trigger action to 'highlight' (which will just mark the whole string that matches) or 'send notification' with param: "matched \1 @ \2" or something).
If that works, you can set it back to 'set user & host', and in the same profile, set the profile badge to something like '\(session.username)@\(session.hostname)'. That should work as expected on localhost (where you have shell integration installed), and the 'echo ... && sleep' line from before should make it briefly change to 'root@whatever'.
That's all still in your default profile.
If that all works as expected, in your special root-only profile check the auto-switch rule is 'root@', and see if it gets activated then.
Thinking about it some more, you probably want a trigger more like
'^\[[0-9:]+\]\[(\w+?)@(\w+):' / set user & host / param: '\1@\2'
so it matches & updates your non-root prompt on the remote host as well, although the impact of not doing that would be having your root profile stay active for too long, rather than too little.
--T