No no. I don't think this will work. In fact i think is impossible to do
What I said previously is that I did found some kind of bug importing some certs from metadata file, or exporting from a dev F5 and importing into a prod F5, I can't remember exactly because I was about to begin fool at the moment. The procedure of the .txt/.cer file is a way to ensure they are imported correctly (comparing these with the ones on the gui)
Of course any manipulation of the certs will broke any automation
I think the best idea is if we can look at the metadata file