TL;DR: 1936. Answer goes from describing the one I found, how I found it, what could be an earlier instance, and ends on a treat for nitpickers.
I've done some research (see below) and the earliest one I can trace is this panel from "The Secret Ray", also known as "Manitoba no reply", the first issue of The adventures of Jo, Zette and Jocko by Belgian author Hergé, which was originally pre-published in the French weekly newspaper Cœurs vaillants.
The panel is dated from February 2, 1936. Full page here, if you're curious.

From where I stand, "The Secret Ray" qualifies as SFF in the sense that while Adventures of Jo, Zette and Jocko can feel like classic 1930s action-adventure stories for children, this particular story features:
An evil scientist who created a taser-like ray, as well as the title "secret ray", which he uses to put ships' crews to sleep and steal from them.

A killer robot, creation of aforementioned scientist. The robot is remote-controlled, but is intended to be fully autonomous, the "first living being ever created", elevating its creator as a God.

Research done
I meant to randomly browse 40s-50s Marvel/DC comics at first, but I grew up with Franco-Belgian comics, and the grawlixes are recurrent in those. I found several in Tintin issues, which were also written and drawn by Hergé. Not all Tintin issues qualify as SFF though, so I went for "Manitoba no reply" which I knew was SFF.
Bingo, just had to trace back the original one from the 30s to make sure the grawlix wasn't added in the later reprints. Jackpot, it wasn't. :-)
So what could be an earlier instance?
- For the sake of completeness, let's mention this Slate article which provides a 1902 grawlix from Katzenjammer Kids (not SFF as far as I know).
- The Hergé panel being dated from 1936, most classic comics franchises are out (Superman for instance debuted in 1938).
- user14111 mention Li'l Abner in a comment, with a grawlix dated November 27, 1951. I've been through a good bunch of the 1934-1935 Li'l Abner strips (available on this website) and found none, though it's possible I missed one. However, the SFF element in this comic is apparently the Shmoos, which if I am to believe Wikipedia were only introduced in 1948.
- I don't have access to early Tarzan and Mandrake the magician comics, but grawlixes usually are a "comedy" thing, and from the little I know of these, they don't seem to qualify.
- There's a comic titled The Adventures of Patsy which involve a magical kingdom and a magician, and looks cartoonish. It debuted in 1934 though, so it's a narrow period to catch up to Hergé's 1936.
For nitpickers
Someone wants to argue that the 1936 panel isn't exactly profanity, and just the ship's captain's confusion (though it could be profanity - the captain's confusion was already depicted in the panel before)?
Fine, here's my second best. It's the earliest grawlix in Tintin's issue "Prisoners of the Sun" (1948). Not the first grawlix in all Tintin issues, but the first in a SFF one.
