The popular SZ042 module for the DS3231 RTC has a 2032 holder onboard, and it has a "charging" circuit consisting of a 200R resistor and a 1N4148 diode in series. This is a holdover from the time when the holder was populated with an LIR2032. When powered from 5V, this circuit would apply about 4.4V to a CR2032 continuously. Many thousands of these modules have been sold with CR2032s, and you don't hear of batteries blowing up. I don't know how well the charging circuit actually works for an LIR2032. It doesn't follow the CC/CV algorithm, and never terminates, so it definitely doesn't follow the rules. But I don't know if that matters.
But the question in my mind is what the TP4056 would do when attempting to charge a CR2032. If it applies full charging current, would voltage ever reach 4.2V? How much current would actually flow? If almost none did, would it terminate? It seems to me that you should give this a try. There may be no need to detect a CR if the TP4056 would refuse to charge it in the first place.
Don't forget to replace the TP4056's default charge current setting resistor. I read that 33K (for 35mA) is the right one for an LIR2032.