I looked at the first query.
I don't understand why you are repeating again the bool part inside the agg as aggs are applied by default on the resultset (which has been filtered yet).
When I looked at the main query, well you have a lot of should clauses here. That's is I guess why you are spending a lot of time of running the queries.
You can try to use the profiler tool available in X-Pack Basic in the Kibana interface to get more insights about the performance you are seeing.
cc @jpountz who might have ideas to optimize your queries may be.