However, that was almost a decade ago. I wanted to leave my country and started looking for jobs in the US, and took the first one that made me an offer.
Ever since, I've been working in online services. I've had a successful career so far, and I'm now a senior engineer at a large and well-known company. But I never liked the jobs I've had as much as my first two jobs. I've been powering through it for years now, but I'm starting to burn out.
The world of services doesn't resonate with me. I hate being unable to attach a debugger to my code. Or having to reason about what could be wrong when I have 50+ machines running the same software, connected to other machines and services, and who knows what's going on that's causing load spikes that are bringing everything down. That sort of thing.
The processes involved are awful. I've only worked at places where there's a strict engineering vs. operations split. I hate doing "debugging by proxy", having to get on a call with an ops person to relay to them what commands I want them to run on a box so I can diagnose what's wrong. Something that would take me 10 minutes takes 2 hours.
Don't get me started on Kubernetes.
Finally, I loathe being on call. Even if it's only once a quarter, I just dread it.
I'm not sure there's a way out though. I've been working on services for years, and all jobs these days seem to be in that space. I would love to go back to desktop software development, or even get into something new like embedded software (which seems really attractive, at least from outside). It's funny that I concentrated in systems programming and embedded software development when I was in college, but ended up not building a career in any of those fields.
While it's been a while for you professionally, if you were a developer before, you should still have the core skills. If you feel like they've stagnated too much, brush up on your own first. If you want to go all-in, there's no time like the present for getting more formal education (remotely).
If you want to go back to systems development, you can try to take a backdoor route by getting a job at a hardware company doing services development and gradually switch over to a systems development role. There are IoT companies, there are industrial and business equipment manufacturers who make things that need to be cloud enabled (e.g. barcode scanners), there are small consumer electronics companies (e.g. Sonos), etc. They're rare but non-web jobs are out there.