I'm currently using the Redirect module in Drupal 8 along with Pathauto to create aliases on all url's. So for example /node/23 would be /article/some-text-here. When a user types in /node/23 in the url it automatically redirects them to the alias url. I want to show a 404 whenever the user uses the node path url instead of redirecting that way they don't ever have a chance to find something they shouldn't by traversing through my site with that pattern.
The rabbit_hole module can be used to set 'access' controls for rendered nodes, taxonomies, and other entities. When a user visits the /node/* or /taxonomy/term/* page, you can control what happens--403 page, 404 page, redirect, whatever. This can also be overridden on a per-node basis if you require that.
This still allows the entities to be accessible via path alias and shouldn't break any references to those nodes/taxonomies.