Yes this is the simplest way to do this.
However, if I understand correctly; an anonymous user can select the user role when registering?
If so; I suggest to replace that by adding a enumeration attribute, which can be selected. Base don selected value, set role in microflow. Also, do not use the User/Account entity to register, but a Non persistable entity, mimicing the user/Account entity. Commit Microflow will create the Usre/Account object and copy the set values (+ set role)