Geometric origins of topological insulation in twisted layered semiconductors