@rkaplan: As far as I have been able to determine thus far, moving a Desktop is not possible on a programmatic basis. The only interface that I have ever seen for doing so is via Mission Control at the UI level.
I am sure you are aware that windows can be moved between monitors relatively easily with tools like Keyboard Maestro - although there is a catch here, because as far as I have so far figured out, KM does not let you easily specify which monitor you are going to move to. In other words, I have not been able to figure out in KM how to easily convert the numerical order by which it addresses monitors into the specific monitor correlated with that number in order. (I should say that it is doable IF the monitors are of different screen resolutions by getting the dimensions of each monitor and correlating it with the numerical index in KM, but if the monitors are all the same resolution then it is a more difficult task, one that I have not spent time trying to sort out.)
It may be possible to move an entire Desktop using AppleScript with UI scripting (eg ‘tell application “System Events” to …’) but I have yet hack out something that actually works.
I believe, but am not certain, that Desktops are maintained by the WindowServer process, and as such as also not constructs at the level of the system window handling, eg I do not know that you could implement a solution in Objective C or Swift either.
I’d be interested in any solutions that anyone else can suggest and any corrections to my understanding above.