Perhaps you will find this answer relevant The Origin of Thought
When we look at the connectomes of simple organisms, we see various 'input channels'. Neurons that specialise in tasks like self-other determination. We can extrapolate that 'primitive' into specialised regions for touch, and proprioception.
When we look at convolutional neural networks, we see how a series of specialised subroutines can operate together: edge detection, 3D shape identification, movement identification etc. Leading to reactions (see the book Thinking Fast And Slow). And building a picture - this relates to the Global Workspace Theory of why we have a mind and unified awareness.
If you look at split-brain patients, where the hemispheres were separated as a medical procedure, it was revealed one hemisphere is focused on integrating information about the self & the body, the other on building a picture of the world. Information from a given channel can contribute to both - eg our sense of balance is primarily visual, secondarily from our ear canal, and also fed information by proprioception - we use these channels in a dynamic way, and we can stimulate better awareness through learning, as people undergoing physiotherapy do (consider how reduction in working memory with ageing makes falls more likely - working memory limits the 'global workspace' size).
The split-brain case illustrates the multi-agent nature of our brains, and how we don't directly experience sensations, but constantly process them and integrate them into a picture that also involves our intentions and purposes - see Donald Hoffman on why we can't rely on evolution to show us reality. Also Anil Seth on why our 'reality' is better described as a useful hallucination.
In your example, we can picture the channels of say heat and pain, as rooted in the role of individual specialised neurons in the early connectome, successively hijacked by additional purposes. Pain is highly subjective, with heat-blistering strongly dependent on attention, and inducible by touch alone under hypnosis. Critical injuries like being shot often don't trigger pain initially, and we consciously trigger the adrenalin to get out of danger - or trigger instinctive responses and go into shock, which may be helpful, or may kill a person. Pain is not best described as a 'sensory primitive', because a lot of processing is done around identifying threats & dangers, with inputs from multiple channels. But there are action-potential thresholds being crossed by specific neurons, which feed into specialised networks linked to particular purposes, and feed into brain regions which abstract useful information into layers of convolutional neural networks, which build a picture, and tag for urgent responses like reflexes, or adrenalin response/fight or flight.