If your car is a stock 87, it has the TFI in a distributor.
The CPS is for the DIS as per JS.
It is most likely your TFI... too bad, they can last indefinitely with maintenance every few years; remove, scrape off the old grease, apply new.
And the replacement is more likely to fail from causes other than heat.
BTW, it's NOT the heat from the engine that kills it.. it's own heat kills it if the grease dries up and turns into an insulator.
And you can tell if your dist pickup/ TFI or coil is bad by simply watching your tach
If the tach needle bounces a little when you switch ignition on but not when the engine is trying to start, the problem is on the dist side... usually TFI.
If the needle doesnt bounce at all, it's your coil or wiring.