I wrote about the danger of large cache-control debugging headers back in 2023:

https://www.drupaleasy.com/blogs/ultimike/2023/07/solving-local-502-bad-gateway-drupal-issue

I think that this will no longer be an issue starting with #Drupal core 11.4.0: 🎉🐛✅

https://www.drupal.org/node/2844620

Solving a local "502 Bad Gateway" Drupal issue

DrupalEasy