What could be the negative factors in getting a PhD position in theoretical computer science?
I have been in your situation, my first instinct tells me that you need to look into some developing jobs that pays and are challenging. So here are my couple of points:

How Well Is Your Personal Life?: I did obtained PhD in Computer Science and worked both as a lecturer and developer; and let me tell you that the "soul sucking" thing, needs to be deal with as a personal life solution and not professional. I did seen both academics and developers to be out of touch in personal wellness, and lived a very dark and sad life; that is nothing to do with what they are doing professionally. 

Age/Industry Isn't the Issue: While I was doing my PhD, a friend of mine who was 70 years old, built 2 software companies and sold them all, retired; and start doing PhD because feels like it. So, neither age or industry isn't a problem. 

What sort of developer? Ok, this might look funny but actually it is important to know what sort of software developer job you are doing? Were you dealing with old legacy software that you needed to maintained so it made you frustrated; or you were doing Web front-end stuff, which is a combination of taste and coding and not too much "science". If you are into logic related stuff, have you ever tried back-end development jobs? This is something you need to think about. 

Challenges As a Developer: You mentioned the developing jobs is not challenging. I was shocked! There are so many challenges today in industry, that people are trying to figure out. Look into cluster/distributed computing, containers, operating systems, wearable technologies and all their overall networking paradigms, and so on. You can also try to get some jobs which are challenging; so you could feel to void you are feeling, instead of spending the next year betting on being a lecturer. This brings me to the next point.

Lectureships: You might think, well I study couple of years as a PhD student and then Boom! I'm a lecturer in Germany or Europe. This is not true. Right now the trend in Europe is close to madness, to become a lecturer you should do some serious research, or coming from a huge research-based company (e.g., Google, etc.). Moreover, compare to industry, the payment is not very well; and the hours you have to put up with students, meetings, etc. are too much.