I'm not an indexing/performance expert with ArangoDB, but I recently had some issues with deadlocking too and by reconstructing and reshaping the queries had huge performance gains, sometimes queries that took 120 seconds then took 0.2 seconds.
A key thing I did was try to help ArangoDB know when to use an Index, and make sure that index is there to be used.
In your example query, there is a problem that stops ArangoDB from knowing an index occurs:
FOR o IN ['pmlibrary/199340787']
FOR v,e,p IN 0..7 INBOUND o pm_child
RETURN p.vertices
The key issue with this is that your original FOR loop is using a value out of an array, which may hinder ArangoDB identifying an index. You could easily replace your o with a parameter, and put in your 'pmlibrary/199340787'
value directly, and with the Explain button see if it identifies it can use an index.
One issue I found was trying to make it super clear to use an index, which sometimes meant adding additional LET
commands to allow ArangoDB to build the contents of arrays, and then it seems to know what index to use better.
If you were to test the performance of the query above, versus something like:
LET my_targets = (FOR o IN pmlibrary FILTER o._key == '199340787' RETURN o._id)
FOR o IN my_targets
FOR v,e,p IN 0..7 INBOUND o._id pm_child
RETURN p.vertices
It may seem counter intuitive, but with testing I found amazing performance gains by breaking queries apart to help ArangoDB notice it could use an Index.
If any queries are against the values within Arrays or if you are using dynamic attribute names, then it won't always use an index even if one exists.
Also I found that the server will cache response for queries, so if you want to test changes to a long running query and want to avoid cache hits on your second + queries, I had to stop and restart the arangodb3 service.
I hope that helps give you a target for shuffling around your query to work with indexes.
Remember you already have inbuilt indexes on _id, _key, _from, _to, so you need to try and make sure it's going to use other indexes that can help speed up your query.