Hi matteoraggi
You can do so with our Product Levels add-on and enabling the BOM stock control option.
With it, you can assign BOM products to any final product and, once one it's sold, all the stocks of products sharing the same BOMs will be adjusted accordingly.
If you have further questions, please let us know 😉
Best Regards,
Salva.