The wire to the subpanel is too small
This is the biggest gotcha here.
Presumably there is a main breaker upstream of this point e.g. Outside. Breakers protect wires. It is sized to protect the fat aluminum wires coming to this panel. The wires to the sub are much smaller and the main breaker cannot protect them. This sort of daisy-chaining panels is legal but all the wires must be sized for the protecting breaker (or vice versa).
There is an even worse possiblility: that this is a split-bus "Rule of Six" panel, designed to h ave 6 main breakers in its top 12 spaces and those are the only breakers. In that case, the wires to the subpanel would have no protection whatsoever. Daisy-chaining like this should not be done on a Rule of Six panel.
As you observe, the lugs are double-tapped. You can't do that. There are double lugs made for that purpose which provide 2 voids and 2 setscrews. That lets you set torque correctly for each wire type independently.
All the wires are white. You can't do that with wire 6 AWG or smaller. If the wire is larger than 6 AWG (doesn't look that way), you still have to mark the hots with black brown red orange yellow pink blue or violet tape or shrinkwrap. That won't matter because you have to pull the wires and replace them with correct wires.
The good news
The main wiring method is metal conduit, hence the notable lack of ground wires. The conduit is the ground. That makes it a lot easier to replace wrong wires. Generally main feeders like the one to the subpanel are aluminum, but depending on the size of the conduit, you may need to use copper wires to get wires small enough to be fill-table legal in the existing conduit.
To fix it
Start by making sure our assumptions about grounds are correct.
Next figure out where your main breaker is. If it's outside the house, we can entertain the idea of continuing the double-lugging concept:
look at the conduit for the subpanel wires and compare that with the conduit fill table. Given that conduit, what's the largest size of wire that will fit 3 in that conduit?
Look up that size on the wire ampacity table, and working out of the 60C columns, search for a "happy match" amongst your main breaker size, ampacity of wires that will fit in that conduit, and cost.
If can find a happy match, then replace that cable, and replace the lugs with double lugs. If you cannot, then daisy-chaining won't work.
If daisy-chaining can't work, then you need to move the subpanel wires to a 2-pole breaker actually in this panel, which means making space in this panel.
- You do that by setting a new subpanel right next to this panel, and moving at least 4 spaces' worth of breakers over to the new near-subpanel. (If it's a split-bus Rule of Six panel, you need to free up these spaces in the top Rule of Six area). Then install the two 2-pole breakers, one for the near subpanel, one for the existing subpanel. Get a nice big subpanel so you never have this problem again.
If you haven't replaced the 3 white wires yet, now it's time to do that - 2 must be replaced with colored wires. Black-black or black-red will do, as will any legal "hot" color.