PerimeterSubscriber isn't triggered for me on fast404 requests.
The comment in \Drupal\perimeter\EventSubscriber\PerimeterSubscriber::getSubscribedEvents() claims it does, but \Drupal\Core\EventSubscriber\Fast404ExceptionHtmlSubscriber sets a priority of 200, and if an event is set, then the event propagation is stopped and the response is returned early.
Set the weight to 300, to be before fast404.
Active
3.0
Code