*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. If two works with the same title should appear on the same day with the same editor, use a distinctive phrase from the first page as a subtitle, as in Papal bulls (like *In Nomine Domini* from 1059) or psalms. If the contents of the two works should be wholly identical, it doesn't matter which one you refer to. I hope you will be able to sleep tonight with this advice.