There is a series of intended acts narrated at Chapter 37 of the Book of Genesis, which culminates in the sale of Joseph.
I don’t think that anyone has more facts than anyone else except as narrated in the said chapter, which I consider pivotal in determining the human trafficking of Joseph which takes place in Dothan, where Jacob’s ten brothers had meandered into from Shechem with their flock.

The fist part of evil intent is expressed by the sons of Bilhah and Zilpha, the maid servants of Rachel & Leah, who when they sighted Joseph afar discussed among themselves that if they killed Joseph, they could put an end to the fulfilment of Joseph’s DREAMS.
Who were the sons of Bilhah & Zilpah?
Dan and Naphtali were Bilhah’s; and Gad and Asher were Zilpah’s children by Jacob. Essentially the four sons who conspired to kill the dreams of Joseph were these four boys born to the maids of Jacob’s wives.
From the narration it is clear that these 4 were in the outer, if we look at the formation of the wives and children of Jacob when they were arranged by Jacob to meet Esau, his bother, at the vanguard were these two maids and their 4 sons. The middle was Leah and her six boys; and the rearguard comprised of Rachel and her two sons Joseph and Benjamin.
This formation must have been the hierarchical structure within the brothers too.
It is clear that they could PROPOSE BUT CANNOT EXECUTE WITHOUT THE APPROVAL OF RUBEN.
Ruben heard the conspiracy and tells these four to desist from killing Joseph but to keep him in the pit so that Ruben could rescue Joseph later.

From the narration it is clear that Judah enters with his own proposal of selling Joseph to the Ishmeelites who were on their way to Egypt with their spices and myrrh sourced from Gilead.
When Judah and his brothers were waiting, Midianites pull out Joseph from the pit and sell Joseph for twenty pieces of silver to the Ishmeelites.

28 Then there passed by Midianites merchantmen; and they drew and lifted up Joseph out of the pit, and sold Joseph to the Ishmeelites for twenty pieces of silver: and they brought Joseph into Egypt.

But there arises a contradiction at the end of the chapter wherein it is mentioned as follows:

36 And the Midianites sold him into Egypt unto Potiphar, an officer of Pharaoh’s, and captain of the guard.

Therefore, the ultimate sale is made in Egypt by the same Midianites to Potiphar.
So what is this arrangement between Ishmeelites and the Midianites?
I believe in speculation that after retrieval of Joseph from the pit, the Midianites who were merchants in articles did not want to take up trading in slaves nor were they into human trafficking, which involved controlling the human being, guarding, feeding and marching him to Egypt, which they as merchants didn’t want to get embroiled in, consequently the Midianites must have sold Joseph for 20 pieces of silver with the assurance that if the Ishmeelites were to successfully bring Joseph to Egypt, the Midianites would get Joseph sold to someone at a good price, which would not only make good their 20 silver but fetch a better price including the cost of transporting joseph and a handsome profit over and above their initial investment. The Midianites would also get a commission on the final sale price.
Wonderful arrangement it seems.

So Ruben returns and finds that Joseph was not in the pit. What was his reaction?

Was Judah with his elder brothers Simeon & Levi the types who would have meekly left the scene without any money?
I guess not.
There is enough room to spin a big Hollywood story on this missing link.
Ruben is astonished that Joseph was not in the pit. Look at Ruben’s reaction, quite sincere:

29 And Reuben returned unto the pit; and, behold, Joseph was not in the pit; and he rent his clothes.
30 And he returned unto his brethren, and said, The child is not; and I, whither shall I go?
31 And they took Joseph’s coat, and killed a kid of the goats, and dipped the coat in the blood;

Ruben is astonished and he is bothered more about how he would answer their father Jacob. The story is spun, the multicoloured coat which the maids’ boys had stripped was drenched with blood and presented to Jacob, as if Joseph was killed by a wild animal on his way to meet his brothers.

There is no effort by the four boys of the maids nor is there any mention of Simeon. In the latter chapters it is shown how Joseph had kept Simeon as a pledge till Benjamin was brought to him. Why Simeon? Simeon and Judah were the FORCE, the brutal force of the twelve and they were a pair. Joseph with all his experience in the most trying circumstances had learnt that these two HAD TO BE SEPARATED and by a master stroke separates Judah from Simeon, while taking Simeon as a pledge.
So from Chapter 37, the persons who were responsible for the sale of Joseph were Judah, Simeon, Dan, Naphtali Gad and Asher.
Ruben was kept ignorant and like a chief executive who is only worried about his charge, upon a credible alibi propounded by the conspirators abandons his pursuit of facts.
Levi was absent and the other two boys Zebulun and Issachar were probably hoodwinked by their powerful siblings Judah and Simeon.
But did Judah and Simeon make a part of the money out of the 20 silver coins?
For all we know, it could have been these two who had shown the boy in the pit to the Midianites to rescue Joseph and later enter into an arrangement with the human trafficking Ishmeelites.
Maybe Judah used the ill-gotten silver to obtain his wife Shuah, which appears in the very next chapter. A much older Judah is seen with bracelets, staff , all those accoutrements of a dandy when he went after his own daughter-in-law, whom he thought as a harlot‼️

Let us look at Joseph’s version

Chapter 40
15 For indeed I was stolen away out of the land of the Hebrews:

Joseph says he was STOLEN and nowhere does he say that he was SOLD BY HIS BROTHERS, that is probably because joseph didn’t want to belittle his older siblings in the eyes of the superior Egyptians. But later in chapter 45 when Joseph makes himself known as Joseph to his brothers he says thus:
5 Now therefore be not grieved, nor angry with yourselves, that ye sold me hither: for God did send me before you to preserve life.

Joseph’s verdict is that ‘they had sold’
But not before Joseph brings two of his brothers to super time trouble. Simeon was bound and kept for at least 6 months, as only 2 years had expired at the time when joseph made himself known to his brothers.
Secondly, Joseph humbles Judah to such an extent that he makes Judah tell Joseph that he be taken as a bond man instead of Benjamin.
Joseph, who was perceptive wouldn’t have done these to Judah and Simeon, if they had been blameless.
Definitely, Judah and Simeon were the boys who benefitted by the sale and pretended as if the Midianites rescued Joseph and sold Joseph to the Ishmeelites.
Why am I leaving out Levi? Levi teamed up with Simeon in the matter of Dinah in respect of Hamor of Shechem, but there was a gross injustice involved of using force to rape Dinah and in this case, Levi wouldn’t have involved himself in such a despicable deal. Simeon was up to any violent deal and Judah’s line of reasoning was always ‘profitability’. Considering these traits I am inclined to believe that Judah and Simeon were responsible for an operation amounting to a sale with the active assistance of the Midianites,  disguised as an act of stealing which happened when they left the boy Joseph in the pit‼️