Not clear to me your scenario. You mentioned purchase, production, storage, sales and BOM line warehouses but only warehouse 1 and 2
Anyway, you should understand that refilling is actually a transfer of demand from one warehouse to another
If Warehouse1 is the end of the refilling line, as you describe in your example, than there is the point where a planning order will be generated if stock is not enough (purchase or production depending on your item default setup)
If you need to override the warehouse refilling rules you may want to use Item coverage setup
Here is a simple way for warehouse planning:
Define: SalesWh , ProductionWh, StorageWh
ProductionWh is the place where you store the materials used in production (BOM line as you name it)
I would set refilling like this: SalesWh refilled from StorageWh, and ProductionWh refilled from StorageWh, too
Define the production BOM to use ProductionWh as raw material picking warehouse
Any demand in SalesWh will check for missing stoc in StorageWh.
Depending on the item setup, a planned purchase order or a planned production order will be generated in order to cover any missing quantities
Because your BOM lines are linked to ProductionWh, Planned production geerated for StorageWh will create demand for components in ProductionWh. Missing components in the ProductionWh will require to be transfered from StorageWh
An extra level for PurchaseWh make sense when you receive goods in a warehouse far from the plant otherwise assume to levels of transfers may occur for the same goods.
If you need to control the goods at receiving and consider only the checked quantities as reliable, you may use Quarantine or Quality order generation at product receipt