Thermal management emerges as a grand challenge of next-generation electronics. Efforts to develop compact, solid-state cooling devices have led to the exploration of the electrocaloric effect of ferroelectric polymers. Despite recent advances, the applications of electrocaloric polymers on electronics operating at elevated temperatures remain essentially unexplored. Here, we report that the ferroelectric polymer composite composed of highly-polarized barium strontium titanate nanofibers and electron-accepting [6,6] phenyl-C61-butyric acid methyl ester retains fast electrocaloric responses and stable cyclability at elevated temperatures. We demonstrate the effectiveness of electrocaloric cooling in a polymer composite for a pyroelectric energy harvesting device. The device utilizes a simulated central processing unit (CPU) as the heat source. Our results show that the device remains operational even when the CPU is overheated. Furthermore, we show that the composite functions simultaneously as a pyroelectric energy converter to harvest thermal energy from an overheated chip into electricity in the electrocaloric process. This work suggests a distinct approach for overheating protection and recycling waste heat of microelectronics.