All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
First of all, it should be mentioned that if a person discharges Mathi (pre-seminal fluid), then it is sufficient for him to wash the place of impurity only and it is not an obligation to wash the entire penis and testicles.
Ash-Shawkaani said in his book Nayl al-Awtaar:
"The majority of the scholars are of the view that it is obligatory to wash the place that is stained by the Mathi from the body but it is not an obligation to wash the entire penis and testicles; the evidence for this is that Al-Isma’eeli reported a narration with the wording: 'Perform ablution and then wash it" ‘it’ here refers to the Mathi." [End of quote]
The correct view according to the Hanbali School is that it is obligatory to wash the penis and the testicles together. Al-Mardawi said in his book Al-Insaaf: "According to the view that it is impure: the penis should be washed as well as the testicles when Mathi is discharged; this is the correct opinion of the (Hanbali) School." [End of quote]
Washing the penis and the testicles is like removing an impurity, and it is not necessary to have an independent intention for it.
Al-Bahooti from the Hanbali School said: "There is no intention needed for washing the penis and the testicles nor is there a need to mention the Name of Allah; just as in the case of removing impurity." [End of quote]
Since it is established that washing the penis and the testicles from Mathi is like washing an impurity, and it is not a condition to have an independent intention for it. Therefore, if someone performs Ghusl (i.e. ritual bath due to sexual defilement), it would be sufficient for him, and he is not required to wash his penis and testicles, because what is required is washing them and this is achieved by the ritual bath; just like in the case of someone who has any impurity on his body (and performs Ghusl).
An-Nawawi from the Shaafi’i School of jurisprudence said in his book Al-Majmoo’:
"If there is any impurity on the body of the person who is in a state of sexual defilement, and he washes that place once with the intention of removing the state of sexual defilement (janaabah); then the impurity would be removed. Does this suffice him from having to perform a Ghusl for sexual defilement? There are two opinions, the most correct of which is that it is sufficient for him." [End of quote]
Allah knows best.