This is in the realm of "use your empathy" - if you feel that being asked about your package would make you uncomfortable - don't do it.
Mileage will vary based on culture, friendship, and other norms. I've asked friends of mine what their packages are, so I could get a baseline for myself, but it's not an OK thing to ask to every random coworker in the US. I wouldn't feel comfortable asking the majority of my colleagues or anyone I consider a purely work acquaintance and not a friend.
If him asking him (or a similar relationship but in the reversed position - i.e. junior to you) would make you uncomfortable - live with the lack of knowledge. In the end, there really is no perfectly comparable situation - two people of the same rank are NOT the same person, and will offer different things to the company, which may make their salaries slightly different - so the best you'll get from a single colleague is a single datapoint.
Another option is that if this person is someone you'd consider to be a mentor, you may ask a more abstract question - "what salary should I expect as a starting senior engineer?" - means it's less personal and less specific, but also more reasonable to answer across many data points - I can answer that for my role without disclosing my particular salary.