also, is it theoretically(!) possible that all remaining bitcoins could be mined by end of this year or is there some algorithm or something to prevent that from happening (mining is basically luck-based, correct?)?
also, is there a guarantee that all bitcoins will be available by 2040 (or whatever year they predicted) or is possible that there might still be a few "unmined" btc 200 years from now?
The network adjusts the hash difficulty so that it pays out in a consistent manner. The only way there could be any unmined coins if everyone walked away, I believe. Though some bitcions aren't available now, if a wallet.dat is deleted, or if someone screws a tx packet.