While that might work as the halyard is pulling down on the cap and would tend to hold it in place, that is not how they come from the factory, and I STRONGLY advise against sailing with it just pressed in place. From the factory, they have either come with small stainless pins pushed thru the aluminum into the plastic cap, or with two aluminum pop rivets holding it on from opposite sides of the mast. I bet yours has the pins - take a careful look. You can drive them out with a hammer and a small nail. When you get the the new cap, drill holes smaller than the pin diameter, then drive the pins thru the existing holes in the aluminum into the holes you drilled in the cap.Just pressed in place.
Will 1/8" rivets do it?
Yes, but pop-rivets "draw up" really tight. Little force is needed to keep the cap on.
I'd squeeze the rivet gun until some resistance is felt, then cut and grind off the mandrel. (Go no further than step #2, below).
The force from the rivet can split the plastic, then you'll risk losing the piece again.
While you have the endcap off check that there is still an intact cork or other stopper near the top of the mast. The mast needs to be waterproof so it'll will float when capsized and resist turtleling. A racketball makes a great stopper. You also might want to take of the mast bottom cap and check the stopper there. (The racketball tip originally came from Beldar. I used it on my mast.)
I second the "no 5200."remember 5200 is a forever bond so i wouldnt use it (hard to take out if you ever need to change the cap again)