Likewise, whenever I book a last-minute flight with only middle seats available, I make sure to ask the agent to place me between two passengers with the same last name.
Of course, the last time I did that I ended up between two people who did not want to move, yet still wanted to talk to each other the entire flight with me in the middle.
Well they're not going to ask "Is the seat between Mr and Mrs Jones all right?", there's no need to expose the name to you when you ask to be placed between people with the same last name.
Before the middle seat person gets on the plane, they only know that there are two people there who are married, not that you specifically are one of them. The existence of married people is not a secret.
After you're on the plane, it would probably become apparent that you and your spouse are married, or at least related in some way to each other. If you have some game with your spouse where you pretend to not know each other in public or something, I guess maybe it could ruin that, but otherwise I'm not sure what the harm is.
Generally, agents in legacy airline lounges (e.g. a United Club, Admirals Clubs, etc.) are willing to do things like this.
Anecdotally, I've noticed that they tend to be more senior (so know what's possible / what they can get away with), less busy (so they're less frustrated and frazzled), and tend to deal with much more experienced travelers than a normal gate agent (so, again, they're less frustrated).
See also: the phone reps for high-tier members, for the same reason. (Not that I'd ask for this particular accommodation, but having access to the premium member line is one of the most useful perks of concentrating your travel.)