Is not it a bad shopping experience if the customer adds one of the options from a configurable product in the cart and it shows out of stock status in the cart instead of the product page? Are you looking for a solution to this? The method to show Magento 2 out of stock associated products in configurable products dropdown is the best solution for you.
It will display associated products of the configurable products in the separate dropdown along with their stock status and it will be easy for a customer to decide. Plus, they can subscribe for the notification message when the product gets back in stock.