The fundamental problem is how Prometheus can know which containers should be there. Considering your regex, there is an infinite number of containers that are "absent": 0dev-4, 1dev-4, … 9999dev-4, …fjdhrhfksnhdev-4 etc.
To solve this, you need a list of concretely expected containers somewhere. That could be separate alerts if the number is small, or some metric that is there even when the container is stopped. In that case you can use the unless operator:
all_expected_containers unless on(name) container_start_time_seconds
If there is not already such a metric, you could generate it using recording rules (again requires listing them out but is less verbose), write a small exporter that gets the data from your source of truth, or use
container_start_time_seconds offset 15m
to look for containers that have been running before and now are not. The downside of this is that it is noisy when a container is expected to go away, and these alerts "resolve" after 15m whether the container is back up or not.
/MR