Yes with solution 1 and 2, ie without pdfx you can use \@title \@author and \@date. Provided you do it before \maketitle, or patch it to avoid erasure.
My answer was related to solution 3, as a macro in a filecontents environment will be written verbatim in the file. So you will need a specific \write with small problems of encoding if you use letters out ...
I don't know anything about hyperxmp, but for sure pdfx package loads xmpincl to handle the expected XMP metadata.
Your problem could arise from a slight syntax confusion.
1. Your approach
should work, as long as :
you have loaded ...