In this example score you will see some of the note heads are normal size and others are slightly smaller. My understanding isFootnotes under the larger notesscore indicate the large note heads should be played a little louder. (I can't confirm that with a source"emerge" as clear melody notes.)
Obviously the example shows broken chords, but you could use large/small note heads on simultaneous chords.
A limitation is you can't be specific about dynamics, such as large notes are forte and small notes are pianissimo. But maybe it would work for your purpose.
If you really want to treat the chord as separate voices, use multiple staves (three notes chords would then become single notes on three staves) and then you can indicate the dynamics with the usual level of detail.
If all the melody notes where the top of the chords, you might try setting the stem directions up and the lower notes stems to down and then apply the dynamics separately above and below the staff.