If you know the number of levels, then you can just spell them out.
(a:Part)-[:consumes]->(b:partBom)-[:referencedBy]->(c:Part)
(c)-[:consumes]->(d:partBom)-[:referencedBy]->(e:Part)
....
Or you can do it more dynamic.
(a:Part)-[:consumes|referencedBy*8]->(c:Part)
WITH rels(path) as rels, nodes(path) as nodes
WHERE ALL(idx in range(0,length(rels)-1,2) WHERE type(rels[idx]) = 'consumes')
AND ALL(idx in range(1,length(rels)-1,2) WHERE type(rels[idx]) = 'referencedBy')
AND ALL(idx in range(1,length(nodes)-1,2) WHERE labels(nodes[idx])[0] = 'partBom')
Usually for something like this, I'd look into the Java API for efficient incremental evaluation of something like that.