To get a unique merged bounding box (bbox) from multiple relations returned by your Overpass QL query, you need to:
Extract the bbox of each relation from the response.
Merge all bboxes into a single bbox that encompasses all individual bboxes.
How to do it:
1. Extract bboxes from the Overpass response
The Overpass API returns each relation with a bounds field if you use out bb;. The bounds field contains the min/max latitude and longitude for that relation.