It's possible to do, but as mentioned above, I would only do it with aquarium safe silicone. I made PVC tunnels/caves just as you mentioned, using aquarium silicone. They held well. Silicone is better to use, since you can take it apart if you don't like it. With epoxy, once it set, it will hold. If you do go with epoxy, you also have to use aquarium safe epoxy as well.