Is it possible to make Craft/Twig throw 404 if a template can't be found?
Here's one way to do it – not super elegant, but it works:

{% set template %}
    {{- include('sometemplatethatdoesntexist', ignore_missing = true) -}}
{% endset %}

{% if not template %}
    {% exit 404 %}
{% endif %}

{{ template }}