Is there a way to log or query the n recent SELECT queries to an FDB database file? I have already tried using the MON$ and RDB$ tables but I didn't find anything useful.
There is no history of queries in Firebird. As indicated by Verace in the comments, you can look at one of my answers on Stack Overflow that provides an alternative: using the trace API.
However the trace API requires active monitoring, which has some overhead. As an alternative you could also look at FBScanner, which acts as a proxy between Firebird and your client, which allows it to register the prepared and executed queries.