Regarding printing, an HP Deskjet F4100 series (4.0.5) driver was earlier listed in Printer and scanner drivers for Mac (the web page is now only accessible via an Internet archive search). However, the HP 5.1.1 Printer Software Update - Apple Support package is Not compatible with macOS v12 and newer. The problem seems to be that the installation is prevented under newer macOS versions, while the underlying driver as such may be OK. Some package modifications have been suggested, but the success rate is unclear.
An HP DeskJet f4180 All-in-one Printer Linux driver is available elsewhere.
https://developers.hp.com/hp-linux-imaging-and-printing/supported_devices/index
If nothing else helps, you could possibly investigate whether a small and relatively inexpensive Linux-based Raspberry Pi print server and CUPS could make an HP Deskjet F4180 printer (locally connected via USB) act as if it were an AirPrint printer. The idea would be to allow network printing with AirPrint capabilities from a modern Mac or iPhone/iPad (without the need for additional drivers/software). Look upon this as an experiment. More about how to set up a Raspberry Pi print server can be found in the posts by Techguyuk in Can’t print with iPadOS17 - Apple Community. Tesserax mentioned a Raspberry Pi 3 Model B+ in Can I connect my laser printer to my netw… - Apple Community.