Zimerius: the only ones i can think of are puzzlers such as spacechem or opus magnum
Sure, those have programming gameplay elements, but like you said are more puzzlers (Like Baba Is You or Hack 'n' Slash) where you optimise your solutions than building/sandbox games. That said, some of my favourite games (Bitburner and else Heart.Break()) are also similar in that you have to program solutions to problems in the game, but the languages they use are higher level (JavaScript and SPRAK, respectively, compared to lower level programming like using logic gates to build circuits or using simple assembly-like language and a stack), so it's more convenient to experiment and come up with different solutions which to me makes the games feel more "sandboxy" (I guess Screeps is also similar as that also uses JS, but I haven't tried it).
I think I'm really looking more for games like Dream Car Builder, Stormworks: Build and Rescue, Main Assembly, LogicBots, or even Lego Mindstorms where you actually build robots/vehicles/bases/other "physical" things, then program them to do stuff (though TBH I haven't actually tried any of these, I've only seen gameplay videos about them).
mqstout: It's "action programming" adjacent in that everyone selects their actions/gives orders in advance, then clicks play to play out the turn without interaction, then repeat.
Ah that sounds like Toribash from what I know about it. I think you program the moves of a fighting avatar in it and watch it duke it out with another player's avatar. Or like Mech vs Minions and RoboRally which aren't actually video games, but are board games instead.