Is there a way to minify HTML?
Use spaceless tag. This will not minify the HTML, instead avoids extra whitespace between HTML tags to avoid browser rendering quirks. When cached, can serve better.

In html.html.twig

{% spaceless %}

&lt;!DOCTYPE html&gt;
&lt;html{{ html_attributes }}&gt;
 #rest of the code
&lt;/html&gt;

{% endspaceless %}


For compression there is a twig extension

Edit: Use Minify Source HTML module which comes for both D7 and D8.