Is there a way to union / negate parts with scripts?
Simple answer: No.
Explained answer: There is no in-script function that can hook up parts with each other.
Alternative: You can weld objects together with :addWeld(). You can also pre-model the unions and load them in as you need them, as Defaultio likely did with lumber tycoon 2.
Hope I helped. If I did, leave an upvote or accept! If I didn't, downvote me, report me, spam me, burn a computer down with my image and throw it out the window.
Goodbye.
EDIT: You can, however, union in studio with certain plugins. (Credit to eLunate )