[2209.09509] Data Structures for Topologically Sound Higher-Dimensional Diagram Rewriting