Primary and secondary stress in IPA transcriptions on Cambridge Dictionary when two words are involved
Solution 1:
TLDR: The stresses are changed because this is how native English speakers actually pronounce them (except for the case of roller skate, which I suspect is a typo).
If you have a one-syllable word, it usually has primary stress on that syllable (except when it's a function word, in which case it may not), so Cambridge dictionary doesn't bother to put stress in its IPA for skate, pin, and band.
When you put two words together to form a compound noun, the stress can change. If it's treated as a compound noun, it should not have more than one syllable with primary stress. The primary stress will almost always fall on a syllable which has primary stress in one of the two original words, most often the first word, but not always.
For example, in safety pin the stress falls on the first syllable: /ˈseɪf.ti ˌpɪn/. In rubber band, the stress falls on the last syllable: /ˌrʌb.ɚ ˈbænd/. And in journeyman, there is no stress on man: /ˈdʒɝː.ni.mən/. These seem to be precisely parallel situations, so why do they behave that way? I don't know. But I am an American, and this is the way I actually pronounce these three words.
Personally, I would put secondary stress on skate in roller skate. I don't know why Cambridge Dictionary doesn't; the two pronunciations they give (US and UK) actually do. Maybe there's variation among native English speakers, but I think that it's likely to be a typo.