No, there is no built-in undo system.
However, if you are prepared for it, you can use the /clone
/clone
command. You'll want to clone the part of the map (periodically) you are working on to another, far away area. Then, if you want to "undo" this, simply reverse this cycle, and clone the "backup" area into the "work" area.
Tip: Make sure not to clone from the building area constantly, because that destroys the whole purpose of this. Make sure you clone it every so often; maybe every day-night cycle?