Nowadays, Stripe API provides an Events V2 endpoint, so it's possible to list all events based on the "resource" ID, which is named "object_id".
Example:
$events = $stripe->v2->core->events->all([
'object_id' => $paymentIntentId, // or $customerId, etc
]);
Reference: https://docs.stripe.com/api/v2/core/events/list#v2_list_events-object_id