Dexcom and Insulet, which manufacture medical devices to treat diabetes, have been thrashed this year as investors grew excited about weight loss medications and their potential to treat an array of related conditions.