I have one more question - "How can I achieve this for a multi-user task". Suppose there are three assignees in a currently active sequential task : "User1", "User2", "User3". Of which, User1 is currently active and I want to remove "User1" and "User2" and add new assignee "User4".
If the user tasks have already been created then it will be the same approach querying for those tasks and updating their assignees. If you are talking about user tasks that haven't been created yet that's something different.