Is ArcPad 10.2.5.30 compatible with ArcGIS 10.5.1?
Not quite sure what you mean by "compatible", but ArcPad does not work with web services - which is the output from ArcGIS Server. It also does not work with web maps (from a portal). So, the answer is no.
If you're asking: Can ArcPad work with data created from ArcGIS Desktop 10.5.1, for example shapefiles, then the answer is yes.
FYI, ArcPad Help - Use existing data
Hope this helps,