Was a bit bored so i made it anyway, lol. Do with it as you (anyone) please. Delete the Foundation file if you want the trees to disappear the moment they start building, otherwise they will only be deleted until the wall is done (to prevent exploits?).
walls_destroy_trees.pyromod
Btw, the tooltips like "cannot be built on another building or resource" for walls aren't working in vanilla. A project for someone else