JS / Ajax runs on the client side, not the server side. JSF runs on the server side, not the client side. When you tell JSF not to display the component in HTML, there will be nothing on the client side, so JS / Ajax will not be able to find the HTML element to update / update.
You need to wrap it in another <h:panelGroup>.
<h:panelGroup id="aggiungiAuto">
<h:panelGroup rendered="#{!autoBean.operazioneOk}">
<ui:include src="../component/aggiungi_auto.xhtml"/>
</h:panelGroup>
</h:panelGroup>
, <span id="aggiuniAuto"> , JS/Ajax HTML, JSF.