4 Different HTML from single Craft 3 CMS on 4 different domains?
Yes, you can. How you organize the templates for each site is completely up to you. Here's the docs on setting up multiple sites in Craft.

I would likely use a different layout template for each site. So when I extended at the top of an individual page template it would look like this.

{% extends "layouts/_site_one" %}


Or like this

{% extends "layouts/_site_two" %}