Long story short: Magnets maybe (even probably), electricity no.
Technically, they are both within the tech cutoff date because both electricity and magnetism were well-known even as far back as ancient Greece and China. (The Greeks even recognized them as separate but related phenomena.) But they are both outside the tech cutoff because there were next to no meaningful applications for those technologies during that time. Apart from the compass (which would be useful in Adventurer mode, except that the game already has a 100% accurate navigation system by default), magnets and static electricity were used for nothing but toys, scientific curiosities, and "magic" for temple ceremonies. That's it. No motors, no lights, no robots, and you would need a couple thousand Baghdad Batteries to electroplate even a single copper penny. (Yeah, there's a mention of a Chinese palace gate made of lodestone so heavily magnetized that anyone wearing iron armor could not pass through it . . . but it's never actually been found, and needless to say, such a specialized use doesn't really seem likely to add much to the gameplay.)
Of course, magnets are nothing more than a special-case occurrence of iron and/or nickel & cobalt, or their respective ores, and could easily be incorporated into the game as, essentially, a metal gemstone. They could be found naturally, or if magic is involved, be created via the channel of the Lightning sphere. But as to their possible function in the game? Not much. Toys. Magnetic "buttons" on clothing. The subject of scholarly writings. A slightly more convenient weapon rack / armor stand. And once sailing ships become a thing, they should have more success if they were each outfitted with a compass. In other words, no game-changers here.
Of course, that's assuming that Dwarf Fortress stays generally true to Earth history. With the weirdness coming with spheres and worldgen, the scope of possibility will naturally expand. But that expansion will almost certainly have a magic feel to it, not a technological feel.