My point about using
example.com is that it is one of four special domains that are specifically reserved for when you need a real domain, that works, but doesn't actually do anything.
You could use a domain that's probably always there, but this is better. I've never known it return anything other than a 200.
You could use an endpoint you host, which means you can have control and responsibility of keeping it available.
The acid test for choosing whether to use you own endpoint or to use
example.* is this: Do you want to test whether the internet is accessible, or do you want to test if your specific resource is accessible?