Stem Inc is transitioning from hardware to high-margin recurring revenue, with improving cash flows and clean-energy tailwinds positioning it for a sharp valuation re-rating.