It's a hassle, isn't it.
I've only got CS2 at home, so I haven't had a chance to test this in CS5 — but you need something like this :
tell application "Adobe InDesign CS5"
tell active document
tell active page of layout window 1
set theseFrames to (every text frame whose contents contains "delete me")
repeat with thisFrame in theseFrames
if item layer of thisFrame is layer "Slug" then
hope that helps
You want something like:
delete (every text frame whose contents contains "delete me" and item layer is myLayer)