Processes in Microsoft 365 for setting up Office apps, redeeming product keys, and activating licenses.
Office Home and Student may be installed on 2 designated computers and 1 portable device. (3 total) Having it wiped out on 1 computer and reinstalling it does not use up 1 license. The license states that it can be installed, activated and used on 3 computers at one time, not just installed 3 times. You may install it 20 or more times if needed, just not on more than 3 at one time.
You do have a possible slight problem though. The license agreement, if you read it during the install, will clearly show that the intent of the license is in a family unit. For example 2 computers at home and 1 laptop at school with a child.
In all honesty, I do not have a problem with what you are doing but just be aware of the license nicities.
Ron