Hi,
For the options without variants, it's the same change needed but on this line:
if(!empty($optionElement->prices) && $this->params->get('show_price')) {
For the display of options without stock, I've tested the change myself and it works fine. Note that this change is to display variants without stock of options. If your option doesn't have variants, that would explain why you don't see any change.
Similar to the price change above, you have this line that you need to change too if you want to change it for options without variants:
if(!$optionElement->product_published || empty($optionElement->product_quantity))