In my opinion that's not the recommended way of doing it.
I reckon instead of creating the following file:
You should create the layout file that matches the page you need to change so in your case I assume it's the product page:
Putting everything in one single file in Magento 2 is not best practice in my opinion because it hides the dependencies of your code
By browsing your theme with your first file, I can't know exactly what module layout you're changing so if I'm wondering how the
product.attributes got removed and I only see a
Magento_Theme folder I will probably start looking somewhere else.
However, if I see a
Magento_Catalog folder I'll probably think "oh that could be it".