I have done it a few times, in a few ways.
1) a game that rotated DMs between sessions; the other main DM and I created a "hub world" that had a story wherein a halfling rogue found an artifact that could create gates from world to world. He began exploring, but he didn't realize the gates he created were permanent. We adventurers were following along behind, trying to catch him, to get the device, stop him, and try to seal the gates. Each player in the group designed one of the worlds we arrived in, and DMed the sessions that occurred there. I ran several worlds, and my main Co-DM ran everything in the "hub". It worked okay; it was a shop game, and the specific purpose was to train new DMs.
2) my older brother and I created a shared world (or 2 or 3, but we only ever ran one of them) and then took turns DMing in it. We worked together to create the history of the world, and the basic outline of some mysteries and overarching challenges in the world (as I recall, it was a pocket plane with a large island trapped in it. Nobody on the island knew we were trapped, but there was now some evidence the world was shrinking, and the players had to find out why). We only ever ran 2-3 sessions, and then it fizzled out - an online campaign. We took turns DMing, and we also "helped" when it was our turn to play. But I think we tried to be a bit too railroady.
3) Another online game, of Dungeon World. We swapped DMing positions and playing between story arcs. Since DW is a very free-flowing game in which the PCs are very much encouraged to add their creative input to the world/game, it was a good choice. This was Play-by-post, and lasted well over a year before just recently sort of fading away.
In conclusion, I think Co-DMing can work very well. I liked it better online than in person. I really like that I got a break from DMing and got to play now and again. But knowing I was co-dm enabled me to feel empowered, and to exercise some of my Dming skills even as a player (I took lots of notes, and used facts about the world from their sessions in my game sessions as much as I could). It takes patience, cooperation and good communication skills to make it work. Note: in only the first situation did we ever really completely "co-dm" and that was in the first couple of sessions; it's not usually needed unless you have a very large group. It is much harder than swapping out and can be self-defeating.