This question was addressed in higher dimensions by Mike Freedman, Surgery on codimension 2 submanifolds. Mem. Amer. Math. Soc. 12 (1977), no. 191. (I think this was his PhD thesis.) Earlier work of Thomas and Wood (On manifolds representing homology classes in codimension 2. Invent. Math. 25 (1974), 63–89) had given some bounds for the homological complexity of codimension-2 submanifolds, generalizing those given by Hsiang and Szczarba for surfaces in 4-manifolds. My recollection is that Freedman shows that the Thomas-Wood bounds are close to optimal. The technique is a very clever variation of surgery theory, rather different from the typical uses of surgery theory in constructing embeddings in higher codimensions.
I think the upshot of Freedman's work is that the analogue of the Thom conjecture in higher dimensions does not hold.