Translation of Tractate Succah page 52b according to Sefaria.org
Apropos the end of days, the Gemara cites another verse and interprets it homiletically. It is stated: “The Lord then showed me four craftsmen” (Zechariah 2:3). Who are these four craftsmen? Rav Ḥana bar Bizna said that Rabbi Shimon Ḥasida said: They are Messiah ben David, Messiah ben Yosef, Elijah, and the righteous High Priest, who will serve in the Messianic era. Rav Sheshet raised an objection: If so, if that is the identity of the four craftsmen, then that which is written in the previous verse: “And he said to me: These are the horns that scattered Judea” (Zechariah 2:4), is difficult; these four in the first verse are coming for their enemies, and are not redeemers.
Rav Ḥana said to Rav Sheshet: Go to the end of the verse: “These then are come to frighten them, to cast down the horns of the nations, which lifted up their horn against the land of Judah to scatter it.” This indicates that the horns refer to the nations that exiled the Jewish people and that the four craftsmen will hurl those horns aside. Rav Sheshet said to him: Why should I disagree with Rav Ḥana in matters of aggada, where he is more expert than I, and I cannot prevail?
A similar identification of the four is found in Tanna Debe Eliyahu Rabba, parsha 18 and Mishnat Rabbi Eliezer.
Rashi says the 2 messiahs are craftsmen to build the Temple and Elijah (Eliyahu) was a craftsmen to build an altar on Mount Carmel.
The fourth craftsman Rashi identifies as Shem son of Noah (Malki-Tzedek) who was called a craftsman for building the ark together with his father. Since Shem had already died by the time of the prophet Zechariah it is a question why he is included among the four?
I prefer to leave it to someone else to answer the question.
According to Shir Hashirim Rabba 2:4 and Pesikta de Rav Kahana, piska 5, (Hachodesh Hazeh Lachem) the identity of the four craftsman are Elijah (Eliyahu), the messianic king, Malki-Tzedek, and the Cohen anointed for war.