Cooling facilitated by selection of materials for the device or materials for thermal expansion adaptation