Your answer had errors in it. One was syntax (no comma after slug => parent-category line) and for some reason $parent['temr_id'] didnt work despite it looking correct in the codex...
But it DID lead me in the right direction and I eventually got it working, so thank you!
My solution (theres probably an easier/simpler way):
$parentTitle = 'category name';
$parentSlug = str_replace(' ', '', $parentTitle);
$parent = wp_set_object_terms($postID, $parentTitle, 'category', array('slug' => $parentSlug));
$parentID = get_cat_id($parent);
$childTitle = 'category name';
$childSlug = str_replace(' ', '', $childTitle);
$child = wp_set_object_terms($postID, $childTitle, 'category', array('slug' => $childSlug, 'parent' => $parentID));
Again, thanks for pointing me in the right direction!