Celestrak
I'm not 100% sure, but based on this @called2voyage comment I'm 99% sure that there's enough information in a recent Satcat to get the launch year of every object and the year it disappeared (for whatever reason) if it did. There will be some noise since objects get lost and misidentified from time to time but it should probably be close.
Go to celestrak.com/satcat/search.php then click Raw SATCAT Data
to download a 6 MB text file.
Instructions on how to decode it are at https://celestrak.org/satcat/satcat-format.php
From https://celestrak.org/satcat/satcat-format.php you can see that column 022
is Status, and on https://celestrak.org/satcat/status.php you can see the status codes. Note that "Active is any satellite with an operational status of +, P, B, S, or X"
You can get the launch and decay date directly from the table. However if it did not decay but the status changed to inactive in the past, you will either have to review old satcats and mark when the status changed, or ask @called2voyage why they were so confident that this was the answer :-)
note: no, unfortunately I don't know where to get old satcats!
Operational
Status Descriptions
------ ------------
+ Operational
- Nonoperational
P Partially Operational
B Backup/Standby
S Spare
X Extended Mission
D Decayed
? Unknown
*Active is any satellite with an operational status of +, P, B, S, or X.
On the SATCAT Format Documentation page, one more status code is mentioned:
Note: The "U" code indicates that the satellite is considered operational according to the Union of Concerned Scientists (UCS) Satellite Database.
Space-Track
There is more information in space-track.org but there are several caveats; you need to apply for a login and answer a few questions and provide an email address, and you need pay attention to and follow their terms of service, rules, regulations etc. These likely include not redistributing any information from the site without getting permission, but I believe people do get permission sometimes. For more on that see this and this.