Great question! But not an easy one to provide a straightforward answer. You can compare the two (Daniel to Paul) as it seems they are both using the same metaphor.
According to John J. Collins(1), in the ancient world there was the idea of "astral immortality" among the Greco-Roman and eastern philosophers and religions. "Astral Immortality" concerned how they saw the cosmos and what happened to a soul after death. A simplified answer: a soul would ascend to the "fixed stars" (they saw the night sky as a fixed sphere) and become a star in the heavens. From the article by Collins:
later Stoicism found a place for "the idea of 'astral
immortality' of the return of the souls of good men to the
aethereal regions of the Upper Cosmos whence they came,
where they spend a happy immortality contemplating the
workings of Divine Reason.
There is a saying that God speaks within the culture so that humanity can understand the message. In the case of both Daniel (a more eastern book - Babylon and Persia) and Paul (Philippi was a Roman colony) - the audience would understand the metaphor of "souls" and "stars" even though the Bible is not affirming these as what literally happens to a soul after death. They serve as metaphors to an audience that would understand the imagery.
You can find the same metaphor in other ancient Jewish writings:
A writing known as 2 Baruch 51:10 says:
"For in the heights of that world shall they dwell,and they shall be made like unto angels, and be made equal to the stars"
The book of 1 Enoch 104:1-3 says:
1 I swear unto you, that in heaven the angels remember you for good before the glory of the Great One: and your names are written before the glory of the Great One. Be hopeful; for aforetime ye were put to shame through ill and affliction; but now ye shall shine as the lights of heaven, ye shall shine and ye shall be seen, and the portals of heaven shall be opened to you.
This quote from Enoch (written in the 2nd century BC) sounds very much like the quote from Paul. Enoch was a very popular writing. The book of Jude - v. 14 - quotes the writing: Jude 1:14 Paul certainly would have been familiar with the writings called Enoch.
Another article that covers some of the same ideas is called Origen: On Making Sense of the Resurrection as a Third Century Christian by Paul B. Decock (2). In the article Decock clearly explains how Origen was wrestling with resurrection and the prevailing conceptions of the cosmos (please note that Origen can be controversial so not everyone agrees with him). Origen also writes about the idea of there being a "fixed" sphere in the heavens toward which souls would ascend.
Decock quotes another scholar - Collins (not the same as above) - concerning Daniel 12:
"She points to the tradition of astral immortality in Dan. 12 and to the "Greek and Roman traditions of the translation and apotheosis of human beings"
It seems here that Paul is drawing on Daniel 12:3 and speaking it into the context of his Greco-Roman world to convey the importance of maintaining your holiness in the world. His words would have a place to land for a Jew or a God-fearer (Gentile who follows God) as their minds would go to Daniel. But also for a gentile, who would draw on their philosophis and religions. Each would have a conceptual understanding of what it meant to become "a star."
Hope this helps you along your journey!
Notes:
- Collins, John J. Cosmos and Salvation: Jewish Wisdom and Apocalyptic in the Hellenistic Age. History of Religions 17, no. 2 (1977): 121-42. Accessed July 23, 2020. .
- ORIGEN: ON MAKING SENSE OF THE RESURRECTION AS A THIRD CENTURY CHRISTIAN Author(s): Paul B Decock Source: *Neotestamentica* , 2011, Vol. 45, No. 1 (2011), pp. 76-91