How to prevent programmatically created blocks from caching
The bug is in your code. max_age should actually be max-age.

See the documentation page for more information: https://www.drupal.org/docs/8/api/cache-api/cache-max-age

You could also set the max age in Jdrupal's answer.