I’m intrigued by rivet nuts. You can insert them into plastic with a soldering iron and a slightly smaller hole as shown in this vid at the 4:50’ish mark.
The problem with that kind of rivet is that they are smooth on the outside, so they are easily pulled out if used like shown in the video. Some rivet nuts have ridges that go along the sides. These ridges are there to prevent the nut from rotating, but won't do much in preventing the nut from pulling out. Rivet nuts are primarily for putting solid threads in thin, usually metal, sheets. Rivets in plastic is risky because the rivet will expand, which often cause the plastic to crack.
What you want are heat set inserts. For example something like this:
Metric Inserts Suppliers that sell stuff for 3D printers usually sell these.
Those are melted into place and have ridges on the outside that grabs the plastic. Just be aware that the size of the hole is important. Too large and the nut won't grab properly. Too small and you risk plastic oozing out and potentially clogging the threads.
Also, a strategy to increase strength is to put the nut on the opposite side of the plastic relative to the screw. This way the nut needs to be pulled through the plastic to fail. You can even put in an entire block of metal into the plastic to act as a nut. Since you are layering you could hide everything with the final outer layers.
Another thing to be careful with in plastics are countersunk screws. The screw head can act as a wedge when tightening which could make the plastic crack. HDPE is relatively soft, so this may not be a problem, but be careful.