Here is a link to the conversation topic to help clear your confusion:
Take a step back and see the echoes of your words in history.
> It's impractical to check a bunch of empty buildings for booby traps
That's life. That you might find it hard to achieve your military conquest without engaging in ethnic cleansing isn't a legal or moral excuse for perpetrating ethnic cleansing. Find a way that doesn't require ethnic cleansing or pick more realistic military objectives.
> Rafah was evacuated about a year and a half ago.
A forced expulsion of all existing inhabitants of a city without any right of return is commonly called "ethnic cleansing". So is razing the city. It's called that because it is cleansing the city of all people and/or traces of an ethnicity, like israel did here. Both constitute crimes against humanity, regardless of the excuse (the nazis had excuses for their similar crimes too, look how that went for them).