e.g. if you know you use 20/day and it takes 2 days to get the new parts then you order parts when your inventory hits 40.
If the error bars on the delivery dates suddenly grow, you have to start ordering parts earlier.
So in a sense, yes, needing to hold inventory is against part of JIT but if your goal is to maximize resilience to inventory shortages or supply shocks then no, it's not against their core principles.
The entire point of JIT is to identify those widening error bars early and treat. In this case, by moving more work onshore.
The error bars inherently have a big of a lag due to it taking some time for the average time to catch up to the real world conditions.
Much like trading, you could use exponential and/or weighted moving averages to give you signal as things change.
Stockpiling parts was one method routinely used to mask instances of waste, so they had deliberately worked to reduce inventory held in stock to force waste to become visible, so they could then address the causes of the waste.
But as long as the inventory doesn’t go stale on the shelf, it is a relatively minor waste compared to the other types, and certainly much better than the major waste of having no finished goods to sell into the market.
It requires some deep introspection, and is often error prone.