Applying to an Econ PhD program as a software engineer?
Disclaimer: I'm not in economics

You might consider applying for a MS degree first. I don't know about economics, but I know that in my field at my university, we are a little more selective about Ph.D. admissions versus MS admissions, having something like twice as many MS candidates as Ph.D. candidates. If you otherwise had good GPA and good test scores, you can probably get into an MS degree at a decent school, although maybe not your dream school.  If you can exceed at the MS degree, get a publication or two and network at a few conferences, then you've got a much better shot at a top ranked Ph. D. program.