This is a very interesting question! To understand what is going on in Exodus chapter 4 you actually need to apply a wider Old Testament understanding which requires more ‘space’ than an ‘answer’ allows. Nevertheless an overview....
You need an understanding of ‘firstborn’, in particular who [which god] had a legal right to the firstborn. This actually helps understand a lot, example the issue with ‘Cain’ (firstborn), and issues with Essau/Jacob, (why the second born needed the blessing), why Isaac had to born after Ishmael, etc. And the Passover!
Aaron was the firstborn, and needed to ‘put under’ the protection of the covenant made with Abraham in order to be taken ‘out’ from under that ‘ownership’. And that involved circumcision.
Looking at that incident in Exodus chapter 4, without using the ‘lens’ of that understanding makes some infer/‘see’ that the ‘him’ that the Lord sought to kill was Moses - where as it does not refer to Moses - but Aaron. God”s intention was to use Moses alone - it was Moses’s insecurity that cast Aaron into the role, nevertheless God had to ‘work through’ Moses, as Aaron was the firstborn - therefore exposed.
Now the incident in Numbers you refer to was simply that the practice of ‘marking’ Gods nation (circumcision), thereby putting them under God, had been neglected. By this stage, they were already through sacrificial ritual (Exodus chapter 13) redeeming the firstborn.
13:1 Then the Lord spoke to Moses, saying, 2 ”Consecrate[a] to Me all the firstborn, whatever opens the womb among the children of Israel, both of man and beast; it is Mine.”
At this stage, they were under a different covenant, one that ‘fixed’ that issue with the firstborn.