Identifying Primary Stress Across Related Languages and Dialects with Transformer-based Speech Encoder Models