Since PROKKA was used, you should have all genes in the Fasta file with the suffix .ffn. If the gene name is annotated correctly, you can use e.g. FAST's fasgrep to extract it.
As GenoMax pointed out, that an MSA with 50k sequences is tedious, you can use e.g. MMSEQ2 for clustering.