Have you considered going back to school? It sounds like you need a career reset and school is honestly a good way to do that. There are plenty of CS grad programs that will help you up-skill and give you better prospects for finding a job through the school itself or through networking with other students. Obviously, there is the financial element here but it's an investment in yourself. It's up to you to make it pay off.