Hi,
There is known PR condition tracked PR #1274667, where OSPF over GRE over IPSec is not supported on SRX with standalone CP. This is a dayone issue in standalone CP and is fixed in JUNOS 17.3R1 onwards.
https://prsearch.juniper.net/InfoCenter/index?page=prcontent&id=PR1274667
May i know what JUNOS release you're running on SRX5k?