So the way things work today is this, the way I see it:
1. We have a physical layer -> a wire
2. We have a data link layer -> ethernet + ARP or NDP are common here
3. we have a network layer -> currently, two networks are widely used: IPv4 and IPv6
4. We have a transport layer: tcp and udp and quic
7. We have an actual data, encrypted or not.
So where the DNS fits in this model? People say it is build on top of UDP, so it must be layer7, right? But because of the core function of the DNS protocol, I would put DNS into Layer3, the same as I would put ARP and NDP on layer2 even if NDP is built into IPv6. I would put it on Layer 2 solely by the function it provides.
A sole purpose of the DNS is to make a connect() possible without using direct network addressess, but client use "a string" as a destination. For me this is a Layer 3 protocol, because it is a helper protocol used to establish a connection.
Once you have a connection, on top of it you use other layers to transfer data reliably.
Your solution puts a Layer 7 data into a Layer 3 component by using TXT records. And if there were no TXT records invented, you could still encode binary data in the AAAA records, 8 bytes at a time and hack it to store arbitrary data that a custom "client" can process in 8 byte chunks.
And while clever, this is not the right tool to store layer 7 data.
It is like sitting on an island with a hammer. You need to cut a tree and says: well, I can use hammer to cut the tree or I can try with bare hands. What should I do? While I agree hammer has a higher chance of succeeding, I would advice to find a sharp rock instead. Find or invent a better tool for the job.