Stop overselling yourself to your employer, quit legacy work instantly, insist on working on latest tech only. Ask them to use AI for old legacy maintennace work.
Tech jobs not worth holding on to Instead take deep look at how your earnings are going back into pockets of corporates and government - the overpriced loq quality home u bought, the over priiced car , the MRP marked up gorcery and Medicines, the status sysbol schools you send your kids to - wake up middle class, u signed up for slavery to look good among peers in society