I had a go at this by limiting title_max_word_length to [1, 255].
title_max_word_length
https://github.com/discourse/discourse/pull/28217