*Ibidem* is only used immediately beneath or next to what it is repeating, so there can never be any doubt as to which work it refers to. With that respect I see no problematic *ibidem* in your examples. If there could possibly be any doubt, do not use *ibidem*.

If there are two works whose titles are too similar, you must always add the author when referring to either work.

If a book should be titled *Ibid.* or *Ibidem*, which may perhaps exist, you would simply add the name of the author. If there is no author, either use *[anonymous]* or a description of the context in which the work was conceived, like *The Priapic Society of Berlin*. If two anonymous works titled *Ibidem* should exist, add the date, place, or editor to distinguish between them.