Circuit to replace a relay
Use a solid state relay (SSR)
Some examples include...
AQH3223 , 600V, 1.2A, DIP-8
https://b2b-api.panasonic.eu/file_stream/pids/fileversion/2787
CPC1976Y , 600V 2A, AC Zero Cross, SIP-4
https://www.ixysic.com/home/pdfs.nsf/0/8471676520A90EC185256F5600507F99/$file/CPC1976.pdf