Hi I have clarified this over the years with the senior FIDE International Arbiter at the time, Stewart Reuben, who is busy now writing the definitive book on the History of the Laws of Chess.
You focus on the essential point: treatment of possible moves. The TL;DR is that en passant is based on possible moves, castling is based on rights.
At first glance ...
Following the thread you linked and doing some digging from there, I found a PDF of a 2011 Arbiter's Notebook column which addresses this issue.
Although the player of the
white pieces will lose the right to castle in both diagrams on the next move,
the rule states that in the actual position the player has not yet lost the right to
castle. This means that ...
TL;DR: Based on what's written in the FIDE LoC, the second position is a draw, while the first isn't.
About castling (emphasis mine):
22.214.171.124 a king had castling rights with a rook that has not been moved, but forfeited these after moving. The castling rights are lost only after the king or rook is moved.
In your position, the king had castling rights but ...