The European ammonia industry emits 36 million tons of carbon dioxide annually, primarily from steam methane reforming (SMR) hydrogen production. These emissions can be mitigated by producing hydrogen via water electrolysis using dedicated renewables with grid backup. This study investigates the impact of decarbonization targets for hydrogen synthesis on the economic viability and technical feasibility of retrofitting existing European ammonia plants for on-site, semi-islanded electrolytic hydrogen production. Results show that electrolytic hydrogen cuts emissions, on average, by 85% (36%-100% based on grid price and carbon intensity), even without enforcing emission limits. However, an optimal lifespan average well-to-gate emission cap of 1 kg carbon dioxide equivalent (CO2e)/kg H2 leads to a 95% reduction (92%-100%) while maintaining cost-competitiveness with SMR in renewable-rich regions (mean levelized cost of hydrogen (LCOH) of 4.1 euro/kg H2). Conversely, a 100% emissions reduction target dramatically increases costs (mean LCOH: 6.3 euro/kg H2) and land area for renewables installations, likely hindering the transition to electrolytic hydrogen in regions with poor renewables and limited land. Increasing plant flexibility effectively reduces costs, particularly in off-grid plants (mean reduction: 32%). This work guides policymakers in defining cost-effective decarbonization targets and identifying region-based strategies to support an electrolytic hydrogen-fed ammonia industry.