You could build them from column properties (there definitely should be << Get Tags or something similar)
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Car Poll.jmp");
tab = dt << Tabulate(
Add Table(
Column Table(Grouping Columns(:sex, :marital status)),
Row Table(Grouping Columns(:country, :size))
)
);
dt_tab = tab << make into data table;
tags = {};
For Each({colname}, dt_tab << Get Column Names("String"),
prop = Column(dt_tab, colname) << Get Property("Tags");
If(!Is Empty(prop),
Insert Into(tags, prop);
);
);
And build it from there while taking into account the hierarchy of the groups.
Other option could be to utilize Full Path Column Name(1) but it does affect the column names (and tags)

-Jarmo