Fractal energy gaps and topological invariants in hBN/graphene/hBN double moiré systems