nprofile1qyt8wumn8ghj7un9d3shjtnyd968gmewwp6kytcqyre3nlvve9v0ulm6elkwv5xpr6azl5f3n9u2c3fdjk4733lxa5ypgdzdh59 (nprofile…dh59) That looks exactly like what Coquand published under the name “paradox of trees” https://doi.org/10.1007/BF01995104 (he attributes the idea to De Bruijn).
In the abstract, he writes that it's open whether such a construction is possible without W-types. I'm not aware of any newer developments.