Doing sternous exercise causes increase in intra abdominal pressure which tends to protrusion of abdominal content to come out through opening (viz inner inguinal opening, femoral canal etc) which is closed through different mechanism of our body . The supporter causes extra support to that mechanism hence prevents herniation .
Now You are having erectile disfunction which has recently developed . It can be due to some pathology or pshycological and need to be diagnosed in your case and treated accordingly ( there is treatment for it). Herniation rarely causes this problem .
So in my opinion visit a urologist
clinic for examination of herniation and erectile dysfunction
and always wear supporters before goin to gym .
Hope this ll help
Thanks n regards