ngx.resp.get_headers() is available in earlier phases because it's programmatically possible, not because there's any useful info there :) You're generally going to use this called in header_filter_by_lua*, body_filter_by_lua*, and log_by_lua* directives.
Also please note that some of the data points you listed (like user agent, URI, referer, and method) are _request_ headers, not response headers. You might want to double check your use case and make sure you know exactly what kind of data you need.