Does using `add_action( ‘init’…` cause performance issues?

Performance impact of hooked functionality is determined by how often hook fires and how intensive the operation is.

init only ever fires one per load, so multiple runs are not a factor for it.

Mostly the thing you need to pay attention to is context. If your logic fires on every load and result is conditional the first thing it should do is determine if the context is the one you want. In all other cases that it the only thing it should do.

As long as your context check is lightweight the performance impact should be perfectly insignificant.

If your context check is heavy for some reason you might want to find a more specific hook (such as those in template loader logic) that would fire less and in more narrow circumstances. But for something as simple as example you made that won’t be necessary.