When you read the spell description, especially if you read it's evolution over several editions, it appears the intent was to word the spell in such a way as to prevent players from "weaponizing" the Unseen Servant. As always, the authors will only go so far in their spell description legalese, and rely on the GM to make the final determination.
So, when you say "Are they legal?", my first answer is: Yes, there are ways to use this spell in combat if you go only by what is written. However, you already knew that, as you've listed a couple of clever uses that would do just that and are not strictly prohibited by the text.
However, you're probably actually trying to ask one of 2 other questions:
- I'm a player, and I want to weaponize this spell. Can I do that?
The answer here is: It depends on your GM. Ultimately, they'll decide what other restrictions are implied, intended, or necessary for their game, and that'll probably come down to a case by case series of attempts by you and responses by them. There's nothing wrong with this style of play. I've seen many tables that enjoy exactly this kind of maneuvering between players and GM. However, I can't really answer your question, other than perhaps giving you a litany of clever maneuvers for you to try and for your GM to adjudicate. Which I'm not going to do right now.
- I'm a GM, and my players are trying to weaponize this spell. How can I rein that in?
Although the previous discussion still applies, I can provide a little support here. Generally, if a player's clever use of a spell is going to be restricted, they would like an in-game explanation of the mechanics that makes sense to them. As a GM in previous games, I've dealt with this issue by filling in a fact about this spell in my world that is not mentioned in the description. Timing. There's no indication of how quickly the unseen servant reacts to commands. To further the intent to prevent the use of this spell in combat, I added the fact that the servant's reaction time was not only poor, it was inconsistent, so getting it to stay positioned appropriately, or interact in a useful manner during the chaos of a battle is really just more trouble than it's worth.